Skip to content

Commit

Permalink
Improve Sentry init log and ignore non-actionable error (#4997)
Browse files Browse the repository at this point in the history
* Remove default integrations logging

* Ignore ResizeObserver loop error
  • Loading branch information
obulat authored Oct 7, 2024
1 parent 64f6201 commit 47f44f8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion frontend/server/plugins/sentry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ export default defineNitroPlugin((nitroApp) => {
Sentry.init(sentryConfig)

Sentry.setContext("render context", { platform: "server" })
logger.success("Initialized sentry on the server with config\n", sentryConfig)
logger.success("Initialized Sentry on the server with config:\n", {
dsn: sentryConfig.dsn,
environment: sentryConfig.environment,
release: sentryConfig.release,
})

nitroApp.hooks.hook("request", (event) => {
event.context.$sentry = Sentry
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/plugins/01.sentry.client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ export default defineNuxtPlugin((nuxtApp) => {
environment: sentry.environment,
release: semanticVersion,
app: nuxtApp.vueApp,
ignoreErrors: [
// Can be safely ignored, @see https://github.com/WICG/resize-observer/issues/38
/ResizeObserver loop limit exceeded/i,
],
})
Sentry.setContext("render context", { platform: "client" })

Expand Down

0 comments on commit 47f44f8

Please sign in to comment.