diff --git a/nuxt.config.ts b/nuxt.config.ts index f7fa3cc55e..3d7d6d2f97 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -167,6 +167,7 @@ const config: NuxtConfig = { '~/plugins/ua-parse.ts', '~/plugins/focus-visible.client.ts', '~/plugins/api-token.server.ts', + '~/plugins/sentry.ts', ], css: ['~/styles/tailwind.css', '~/assets/fonts.css', '~/styles/accent.css'], head, diff --git a/src/plugins/sentry.ts b/src/plugins/sentry.ts new file mode 100644 index 0000000000..07b9e09e1a --- /dev/null +++ b/src/plugins/sentry.ts @@ -0,0 +1,9 @@ +import * as Sentry from '@sentry/browser' + +/** + * adds render context to the error event that is sent to sentry + */ + +Sentry.setContext('render context', { + platform: process.client ? 'client' : 'server', +})