1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-01-26 03:52:03 +02:00

Fix code sample in otel.GetTraceProvider (#2147)

This commit is contained in:
Yoshi Yamaguchi 2021-07-31 00:00:58 +09:00 committed by GitHub
parent 2b1bb29ef8
commit 39acab3232
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,9 +31,9 @@ func Tracer(name string, opts ...trace.TracerOption) trace.Tracer {
// If none is registered then an instance of NoopTracerProvider is returned.
//
// Use the trace provider to create a named tracer. E.g.
// tracer := global.GetTracerProvider().Tracer("example.com/foo")
// tracer := otel.GetTracerProvider().Tracer("example.com/foo")
// or
// tracer := global.Tracer("example.com/foo")
// tracer := otel.Tracer("example.com/foo")
func GetTracerProvider() trace.TracerProvider {
return global.TracerProvider()
}