从发送到Sentry的错误的条件文件路径
我正在为我正在从事的CRA项目设置一个自托管的哨兵。
我很难找到哨兵来了解我的伪像的位置(JS和源地图)。上传JavaScript和源地图可以按预期工作,我可以在每个版本中看到它们。
它们可在〜/main.xyz.js
和〜/main.xyz.js.map
内部提供。
当我的应用https://www.website.com/path/to/file/
记录一个错误,它将其成功发送给Sentry。但是该错误为崩溃的JS文件提供了路径,〜/path/to/file/main.xyz.js
。 Sentry然后尝试查找错误时,它会查看〜/path/to/file/main.xyz.js
而不是〜/main.xyz.js
(其中实际上是)。
有什么方法可以剥离路径,而只是让哨兵直接看根?
注意:将URL前缀设置为〜/path/to/file
时,我很成功。但是,这种方法后来对我来说在现实世界中不起作用,因为这条路会根据我所处的发展阶段而发生变化。
I'm setting up a self hosted Sentry for a CRA project I'm working on.
I'm having trouble getting sentry to understand where my artefacts are located (js and source maps). Uploading the javascript and source maps works as expected, and I can see them for each of my releases.
They are available at ~/main.XYZ.js
and ~/main.XYZ.js.map
respectively inside Sentry.
When my app at https://www.website.com/path/to/file/
records an error it send it to Sentry successfully. But the error provides a path for the js file that crashed, ~/path/to/file/main.XYZ.js
. When Sentry then tries to find the error, it looks at ~/path/to/file/main.XYZ.js
instead of ~/main.XYZ.js
(where it actually is).
Is there any way to strip the path and just having Sentry looking at root directly?
Note: I was successful when setting the url prefix to ~/path/to/file
. However that approach won't work in the real world later for me since that path is subject to change depending on what stage in development I'm in.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论