Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Commit

Permalink
add render context prop to sentry error event (#1962)
Browse files Browse the repository at this point in the history
* add sentry plugin

* removed comment

* add sentry plugin to nuxt.config

* add comment
  • Loading branch information
anton202 authored Nov 9, 2022
1 parent 43ac3de commit 61aa3f8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
9 changes: 9 additions & 0 deletions src/plugins/sentry.ts
Original file line number Diff line number Diff line change
@@ -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',
})

0 comments on commit 61aa3f8

Please sign in to comment.