Source File
trace.go
Belonging Package
go.opentelemetry.io/otel
// Copyright The OpenTelemetry Authors// SPDX-License-Identifier: Apache-2.0package otel // import "go.opentelemetry.io/otel"import ()// Tracer creates a named tracer that implements Tracer interface.// If the name is an empty string then provider uses default name.//// This is short for GetTracerProvider().Tracer(name, opts...)func ( string, ...trace.TracerOption) trace.Tracer {return GetTracerProvider().Tracer(, ...)}// GetTracerProvider returns the registered global trace provider.// If none is registered then an instance of NoopTracerProvider is returned.//// Use the trace provider to create a named tracer. E.g.//// tracer := otel.GetTracerProvider().Tracer("example.com/foo")//// or//// tracer := otel.Tracer("example.com/foo")func () trace.TracerProvider {return global.TracerProvider()}// SetTracerProvider registers `tp` as the global trace provider.func ( trace.TracerProvider) {global.SetTracerProvider()}
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |