Skip to content

Commit

Permalink
Fix sentry initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanseymour committed Jan 24, 2025
1 parent fc2a5e7 commit 86773fc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/mailroom/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,10 @@ func main() {

// if we have a DSN entry, try to initialize it
if config.SentryDSN != "" {
err := sentry.Init(sentry.ClientOptions{Dsn: config.SentryDSN, AttachStacktrace: true})
err := sentry.Init(sentry.ClientOptions{Dsn: config.SentryDSN, ServerName: config.InstanceID, Release: version, AttachStacktrace: true})
if err != nil {
ulog.Fatalf("error initiating sentry client, error %s, dsn %s", err, config.SentryDSN)
slog.Error("error initiating sentry client", "error", err, "dsn", config.SentryDSN)
os.Exit(1)
}

defer sentry.Flush(2 * time.Second)
Expand Down

0 comments on commit 86773fc

Please sign in to comment.