Skip to content

Commit

Permalink
fix: Disable Sentry sampling for auth calls
Browse files Browse the repository at this point in the history
...to prevent Keycloak 405 errors.
  • Loading branch information
bprusinowski committed Sep 26, 2023
1 parent 6450cb9 commit e139e3c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/sentry.client.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ 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("/api/auth/")) {
return 0;
}
},
ignoreErrors: [
// The ResizeObserver error is actually not problematic
// @see https://forum.sentry.io/t/resizeobserver-loop-limit-exceeded/8402
Expand Down

0 comments on commit e139e3c

Please sign in to comment.