Kas*_*ami 7 sentry vue.js quasar-framework vuejs3
我将哨兵监控添加到我的类星体应用程序中,但哨兵没有收到任何错误,也没有显示在其面板中
我创建/src/boot/sentry.js并编写了这些代码:
import { boot } from "quasar/wrappers";
import * as Sentry from "@sentry/vue";
import { BrowserTracing } from "@sentry/tracing";
export default boot(({ app, router }) => {
Sentry.init({
app,
dsn: "<my sentry dns>",
integrations: [
new BrowserTracing({
routingInstrumentation: Sentry.vueRouterInstrumentation(router),
tracingOrigins: ["localhost", "my-site-url.com", regex],
}),
],
trackComponents: true,
tracesSampleRate: 1.0,
});
});
Run Code Online (Sandbox Code Playgroud)
我的 Quasar 应用程序是 ssr。我应该如何修复它?
我通过更改代码解决了我的问题,如下所示:
import { boot } from "quasar/wrappers";
import * as Sentry from "@sentry/browser";
import * as Integrations from "@sentry/integrations";
export default boot(({ Vue }) => {
Sentry.init({
dsn: "<dns comes here>",
release: process.env.SENTRY_RELEASE,
integrations: [
new Integrations.Vue({ Vue, attachProps: true }),
new Integrations.RewriteFrames({
iteratee(frame) {
// Strip out the query part (which contains `?__WB_REVISION__=**`)
frame.abs_path = frame.abs_path.split("?")[0];
return frame;
},
}),
],
});
});
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1556 次 |
| 最近记录: |