Thanks to visit codestin.com
Credit goes to github.com

Skip to content

matrixbotio/go-common-lib

Repository files navigation

go-common-lib

Library for common Go code

How to use sentry

// init
cfg := config.SentryConfig{
    DSN: "https://[email protected]/code2",
    EnableTracing: true,
    SampleRate: 0.3,
}

if err := sentryx.InitSentry(cfg); err != nil {
    // handle error
}

// flush buffered events before the program terminates
defer sentry.Flush(2 * time.Second)

// capture error
sentry.CaptureException(err)

// start tracing transaction
tx := sentry.StartTransaction(ctx, "tx name")
defer tx.Finish()

About

Library for common Go code

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 6