Go Language Integration
Backtrace provides multiple integration paths for Go applications.
The following integration paths depend on client tools which require a Backtrace license. If you have not yet received a license, please contact us before proceeding.
For Go integrations in Linux, Backtrace recommends using our Coresnap package. Coresnap will automatically capture core dumps and submit Backtrace snapshots of them to the Coroner object store, without any changes to your code.
While Coresnap is convenient and doesn't require any code changes, there are a few things to keep in mind:
- Coresnap is available for Linux only
- Make sure your Go application's environment includes the environment variable
GOTRACEBACK=crash- This enables your application to generate a core dump when it panics, or when it receives a SIGABRT signal.
- Coresnap will only generate and submit Go application snapshots when the Go application creates a core dump as described above.
If you wish to generate Backtrace snapshots from your code in response to other conditions, or don't meet any of the above criteria, we recommend integrating via the Go-BCD package, described below.
To get started with Coresnap, please see the Coresnap Getting Started Guide.
Go-BCD is an open source package that provides integration with out-of-process tracers, with default support for Backtrace's platform. Using Go-BCD, applications may invoke tracer execution on demand.
To get started with Go-BCD, please see Go-BCD.