Skip to content

Commit

Permalink
redact sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
Pascal-Delange committed Nov 25, 2024
1 parent 254287b commit 45f881e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions infra/sentry.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ func SetupSentry(dsn, env string) {
}),
// Experimental - value to be adjusted in prod once volumes go up - relative to the trace sampling rate
ProfilesSampleRate: 0.2,
BeforeSend: func(event *sentry.Event, hint *sentry.EventHint) *sentry.Event {
if event.Request != nil {
event.Request.Headers["X-Api-Key"] = "[redacted]"
}
return event
},
}); err != nil {
panic(err)
}
Expand Down

0 comments on commit 45f881e

Please sign in to comment.