Skip to content

alexdogonin/zapsentry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zapsentry

Implementation of go.uber.org/zap/zapcore.Core for integration with Sentry.

Example

sentryClient, _ := sentry.NewClient(sentry.ClientOptions{
    Dsn:              "<SENTRY_DSN>",
    AttachStacktrace: true,
  })
log, _ = zap.NewProduction()

reqBodyCtxValName := "body"
log = log.
  WithOptions(
    zap.WrapCore(
      zapsentry.NewWrapper(
        sentryClient,
        zapsentry.WithRequest("request", &reqBodyCtxValName),
        zapsentry.WithSecretHeaders("Authorization-Token"),
      ),
    ),
  )

About

Implementation of go.uber.org/zap/zapcore.Core for integration with Sentry.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages