Skip to content

Commit

Permalink
fix: Finally fix Sentry breaking the login
Browse files Browse the repository at this point in the history
  • Loading branch information
bprusinowski committed Oct 9, 2023
1 parent 3e47868 commit 761ebb6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,5 @@ module.exports = withPreconstruct(
module.exports = withSentryConfig(
module.exports,
{ silent: true },
{ hideSourcemaps: true, autoInstrumentServerFunctions: false }
{ hideSourcemaps: true }
);
6 changes: 0 additions & 6 deletions app/sentry.client.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ Sentry.init({
environment: SENTRY_ENV,
release: `visualization-tool@${BUILD_VERSION}`,
tracesSampleRate: 1.0,
tracesSampler: (samplingContext) => {
// Ignore auth calls to prevent 405 Keycloak errors.
if (samplingContext.transactionContext?.name?.includes("auth")) {
return 0;
}
},
ignoreErrors: [
// The ResizeObserver error is actually not problematic
// @see https://forum.sentry.io/t/resizeobserver-loop-limit-exceeded/8402
Expand Down
10 changes: 10 additions & 0 deletions app/sentry.server.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,14 @@ Sentry.init({
environment: SENTRY_ENV,
release: `visualization-tool@${BUILD_VERSION}`,
tracesSampleRate: 1.0,
instrumenter: {
patch: (mod, path, logger) => {
// Ignore auth calls to prevent 405 Keycloak errors.
if (path?.includes("auth")) {
return null;
}

return mod;
},
},
});

0 comments on commit 761ebb6

Please sign in to comment.