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:
parent
2b1bb29ef8
commit
39acab3232
4
trace.go
4
trace.go
@ -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()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user