Skip to content

Commit aabd79d

Browse files
committed
Fix initialization of sentry
1 parent 466d607 commit aabd79d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: cmd/courier/main.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package main
22

33
import (
4-
ulog "log"
54
"log/slog"
65
"os"
76
"os/signal"
@@ -95,9 +94,10 @@ func main() {
9594

9695
// if we have a DSN entry, try to initialize it
9796
if config.SentryDSN != "" {
98-
err := sentry.Init(sentry.ClientOptions{Dsn: config.SentryDSN, EnableTracing: false})
97+
err := sentry.Init(sentry.ClientOptions{Dsn: config.SentryDSN, ServerName: config.InstanceID, Release: version, AttachStacktrace: true})
9998
if err != nil {
100-
ulog.Fatalf("error initiating sentry client, error %s, dsn %s", err, config.SentryDSN)
99+
slog.Error("error initiating sentry client", "error", err, "dsn", config.SentryDSN)
100+
os.Exit(1)
101101
}
102102

103103
defer sentry.Flush(2 * time.Second)

0 commit comments

Comments
 (0)