Skip to content

Commit

Permalink
feat(sentry): Apply tag to errors that contain third-party frames
Browse files Browse the repository at this point in the history
  • Loading branch information
lforst committed Jun 10, 2024
1 parent da313b5 commit dcdec94
Show file tree
Hide file tree
Showing 4 changed files with 310 additions and 300 deletions.
4 changes: 4 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,8 @@ module.exports = withSentryConfig(module.exports, {
reactComponentAnnotation: {
enabled: true,
},

unstable_sentryWebpackPluginOptions: {
applicationKey: 'sentry-docs',
},
});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"@radix-ui/react-toolbar": "^1.0.4",
"@radix-ui/themes": "^2.0.3",
"@sentry-internal/global-search": "^1.0.0",
"@sentry/nextjs": "^8.2.1",
"@sentry/nextjs": "^8.8.0",
"@types/mdx": "^2.0.9",
"algoliasearch": "^4.23.3",
"esbuild": "^0.19.8",
Expand Down
5 changes: 5 additions & 0 deletions sentry.client.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// The config you add here will be used whenever a users loads a page in their browser.
// https://docs.sentry.io/platforms/javascript/guides/nextjs/

import * as SentryCore from '@sentry/core';
import * as Sentry from '@sentry/nextjs';
import * as Spotlight from '@spotlightjs/spotlight';

Expand All @@ -27,6 +28,10 @@ Sentry.init({
maskAllText: false,
blockAllMedia: false,
}),
SentryCore.thirdPartyErrorFilterIntegration({
filterKeys: ['sentry-docs'],
behaviour: 'apply-tag-if-contains-third-party-frames',
}),
],
});

Expand Down
Loading

0 comments on commit dcdec94

Please sign in to comment.