Documentation ¶
Index ¶
- func InitGlobalTracerProvider(tp TracerProvider, propagator propagation.TextMapPropagator)
- func InitializeForTests() (trace.Tracer, error)
- func InitializeForTestsWithPropagatorFormat(propagatorFormat string) (trace.Tracer, error)
- func NewTextMapPropagator(pf string) (propagation.TextMapPropagator, error)
- type PropagatorFormat
- type TracerProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitGlobalTracerProvider ¶
func InitGlobalTracerProvider(tp TracerProvider, propagator propagation.TextMapPropagator)
InitGlobalTracerProvider initializes the global trace provider and global text map propagator with the provided values. This function edits the global (process-wide) OTEL trace provider, use with care!
func InitializeForTests ¶
func NewTextMapPropagator ¶
func NewTextMapPropagator(pf string) (propagation.TextMapPropagator, error)
NewTextMapPropagator takes a string-like value and returns the corresponding propagation.TextMapPropagator.
Types ¶
type PropagatorFormat ¶
type PropagatorFormat string
PropagatorFormat is an enum-like type representing all the supported OTEL propagator formats.
const ( PropagatorFormatJaeger PropagatorFormat = "jaeger" PropagatorFormatW3C PropagatorFormat = "w3c" )
type TracerProvider ¶
type TracerProvider interface { trace.TracerProvider // Shutdown performs cleanup operations to ensure the trace provider is disposed correctly. Shutdown(ctx context.Context) error }
TracerProvider provides a tracer that can be used to instrument a plugin with tracing.
func NewTracerProvider ¶
func NewTracerProvider(address string, opts tracing.Opts) (TracerProvider, error)
NewTracerProvider returns a new TracerProvider depending on the specified address. It returns a noopTracerProvider if the address is empty, otherwise it returns a new OpenTelemetry TracerProvider.