Skip to content

Commit

Permalink
fix(backend): enable sentry profiling (closes #73)
Browse files Browse the repository at this point in the history
  • Loading branch information
AritroSaha10 committed Dec 27, 2023
1 parent 365ef98 commit f7fe761
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions backend/middleware/sentry.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,15 @@ import (
func CreateNewSentryMiddleware() *sentryhttp.Handler {
// Init Sentry first
if err := sentry.Init(sentry.ClientOptions{
Dsn: "https://1e36660a7a5e022a8f602034da95eca7@o4506142641356800.ingest.sentry.io/4506142665277440",
EnableTracing: true,
// Set TracesSampleRate to 1.0 to capture 100%
// of transactions for performance monitoring.
// We recommend adjusting this value in production,
TracesSampleRate: 1.0,
Dsn: "https://1e36660a7a5e022a8f602034da95eca7@o4506142641356800.ingest.sentry.io/4506142665277440",
EnableTracing: true,
TracesSampleRate: 1.0,
ProfilesSampleRate: 1.0,
}); err != nil {
log.Error().Err(err).Msg("Sentry initialization failed")
}
defer sentry.Flush(time.Second)
log.Debug().Msg("Sentry initialized")

return sentryhttp.New(sentryhttp.Options{
Repanic: true,
Expand Down

0 comments on commit f7fe761

Please sign in to comment.