Go
Support
The raven-go
SDK is no longer maintained and was superseded by the sentry-go
SDK. Learn more about the project on GitHub and check out the migration guide.
Raven-Go provides a Sentry client implementation for the Go programming language.
Getting Started
Getting started with Sentry is a three step process:
Installation
Raven-Go can be installed like any other Go library through go get
:
go get github.com/getsentry/raven-go
Configuration
To use raven-go
, you’ll need to import the raven
package, then initialize your DSN globally. If you specify the SENTRY_DSN
environment variable, this will be done automatically for you. The release and environment can also be specified in the environment variables SENTRY_RELEASE
and SENTRY_ENVIRONMENT
respectively.
More on this in Configuration section.
package main
import "github.com/getsentry/raven-go"
func init() {
raven.SetDSN("https://examplePublicKey@o0.ingest.sentry.io/0")
}
Next Steps
For more detailed information about how to get the most out of raven-go
there is additional documentation available that covers all the rest:
Resources: