Skip to content

Commit

Permalink
testing sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
eparker-tulip committed Oct 3, 2024
1 parent 8b3094e commit a6f04b9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/log/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ func sentryInit(log *zap.Logger) *zap.Logger {
},
}

defaultSentryClient = sentry.CurrentHub().Client()

core, err := zapsentry.NewCore(cfg, zapsentry.NewSentryClientFromClient(defaultSentryClient))

if err != nil {
Expand All @@ -105,6 +107,7 @@ func sentryInit(log *zap.Logger) *zap.Logger {
log = zapsentry.AttachCoreToLogger(core, log).With(zapsentry.NewScope())

log.Info("Sentry wrapper configured")
log.Error("Sentry error test")

return log
}
Expand Down

0 comments on commit a6f04b9

Please sign in to comment.