Skip to content

Commit

Permalink
Merge pull request #829 from nyaruka/sentry_fix
Browse files Browse the repository at this point in the history
Fix initialization of sentry
  • Loading branch information
rowanseymour authored Jan 28, 2025
2 parents 466d607 + aabd79d commit fbceff3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/courier/main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package main

import (
ulog "log"
"log/slog"
"os"
"os/signal"
Expand Down Expand Up @@ -95,9 +94,10 @@ func main() {

// if we have a DSN entry, try to initialize it
if config.SentryDSN != "" {
err := sentry.Init(sentry.ClientOptions{Dsn: config.SentryDSN, EnableTracing: false})
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 fbceff3

Please sign in to comment.