Skip to content

Commit

Permalink
feat(console): added application key to filter out third party except…
Browse files Browse the repository at this point in the history
…ions
  • Loading branch information
baktun14 committed Sep 18, 2024
1 parent d1fb395 commit ef8a224
Show file tree
Hide file tree
Showing 7 changed files with 2,034 additions and 207 deletions.
1 change: 1 addition & 0 deletions apps/deploy-web/env/.env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ NEXT_PUBLIC_BASE_API_MAINNET_URL=
NEXT_PUBLIC_BASE_API_SANDBOX_URL=
NEXT_PUBLIC_BASE_API_TESTNET_URL=
NEXT_PUBLIC_API_BASE_URL=
NEXT_PUBLIC_SENTRY_APPLICATION_KEY=
NEXT_PUBLIC_SENTRY_DSN=
NEXT_PUBLIC_SENTRY_SERVER_NAME=
NEXT_PUBLIC_GA_MEASUREMENT_ID=
Expand Down
5 changes: 4 additions & 1 deletion apps/deploy-web/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,10 @@ const sentryWebpackPluginOptions = {

silent: true, // Suppresses all logs,
dryRun: true,
release: require("./package.json").version
release: require("./package.json").version,
unstable_sentryWebpackPluginOptions: {
applicationKey: process.env.NEXT_PUBLIC_SENTRY_APPLICATION_KEY
}

// For all available options, see:
// https://github.com/getsentry/sentry-webpack-plugin#options.
Expand Down
2 changes: 1 addition & 1 deletion apps/deploy-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"@radix-ui/react-icons": "^1.3.0",
"@radix-ui/react-slot": "^1.0.2",
"@react-spring/web": "^9.3.1",
"@sentry/nextjs": "^7.80.0",
"@sentry/nextjs": "^8.30.0",
"@stripe/react-stripe-js": "^1.12.0",
"@stripe/stripe-js": "^1.41.0",
"@tanstack/react-table": "^8.13.2",
Expand Down
8 changes: 7 additions & 1 deletion apps/deploy-web/sentry.client.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@ Sentry.init({
// Adjust this value in production, or use tracesSampler for greater control
tracesSampleRate: 0.01,
serverName: process.env.NEXT_PUBLIC_SENTRY_SERVER_NAME,
enabled: process.env.NODE_ENV === "production"
enabled: process.env.NODE_ENV === "production",
integrations: [
Sentry.thirdPartyErrorFilterIntegration({
filterKeys: [process.env.NEXT_PUBLIC_SENTRY_APPLICATION_KEY],
behaviour: "drop-error-if-contains-third-party-frames"
})
]
// ...
// Note: if you want to override the automatic release value, do not set a
// `release` value here - use the environment variable `SENTRY_RELEASE`, so
Expand Down
8 changes: 7 additions & 1 deletion apps/deploy-web/sentry.edge.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@ Sentry.init({
// Adjust this value in production, or use tracesSampler for greater control
tracesSampleRate: 0.01,
serverName: process.env.NEXT_PUBLIC_SENTRY_SERVER_NAME,
enabled: process.env.NODE_ENV === "production"
enabled: process.env.NODE_ENV === "production",
integrations: [
Sentry.thirdPartyErrorFilterIntegration({
filterKeys: [process.env.NEXT_PUBLIC_SENTRY_APPLICATION_KEY],
behaviour: "drop-error-if-contains-third-party-frames"
})
]
// ...
// Note: if you want to override the automatic release value, do not set a
// `release` value here - use the environment variable `SENTRY_RELEASE`, so
Expand Down
8 changes: 7 additions & 1 deletion apps/deploy-web/sentry.server.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@ Sentry.init({
// Adjust this value in production, or use tracesSampler for greater control
tracesSampleRate: 0.01,
serverName: process.env.NEXT_PUBLIC_SENTRY_SERVER_NAME,
enabled: process.env.NODE_ENV === "production"
enabled: process.env.NODE_ENV === "production",
integrations: [
Sentry.thirdPartyErrorFilterIntegration({
filterKeys: [process.env.NEXT_PUBLIC_SENTRY_APPLICATION_KEY],
behaviour: "drop-error-if-contains-third-party-frames"
})
]
// ...
// Note: if you want to override the automatic release value, do not set a
// `release` value here - use the environment variable `SENTRY_RELEASE`, so
Expand Down
Loading

0 comments on commit ef8a224

Please sign in to comment.