The LightStep distributed tracing library for Go.
$ go get 'github.com/lightstep/lightstep-tracer-go'
To initialize the LightStep library in particular, either retain a reference to
the LightStep opentracing.Tracer
implementation and/or set the global
Tracer
like so:
import (
"github.com/opentracing/opentracing-go"
"github.com/lightstep/lightstep-tracer-go"
)
func main() {
// Initialize the LightStep Tracer; see lightstep.Options for tuning, etc.
lightstepTracer := lightstep.NewTracer(lightstep.Options{
AccessToken: "YourAccessToken",
})
// Optionally set the opentracing global Tracer to the above
opentracing.SetGlobalTracer(lightstepTracer)
...
}
For instrumentation documentation, see the opentracing-go godocs.