All SDKs
Iris
vgithub.com/getsentry/sentry-go/iris
Use the official Sentry SDK with the DSN shown in your AllStak project setup. No AllStak-specific SDK is required.
Install
These official Sentry commands come from the AllStak-managed SDK catalog.
go
go get github.com/getsentry/sentry-go/irisQuick start
import (
"log"
"github.com/getsentry/sentry-go"
)
err := sentry.Init(sentry.ClientOptions{
Dsn: "{{DSN}}",
Environment: "production",
Release: "[email protected]",
EnableTracing: true,
TracesSampleRate: 1.0,
// Off by default. Enable only if you accept sending usernames,
// emails and IP addresses to your telemetry backend.
SendDefaultPII: false,
})
if err != nil {
log.Fatalf("sentry.Init: %s", err)
}
defer sentry.Flush(2 * time.Second)
sentry.CaptureException(errors.New("hello from sentry-go"))