Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
add render context prop to sentry error event (#1962)
Anton61aa3f83bd68
diff --git a/nuxt.config.ts b/nuxt.config.tsindex f7fa3cc55..3d7d6d2f9 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.tsnew file mode 100644index 000000000..07b9e09e1--- /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',+})