Documentation ¶
Index ¶
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 NewTextMapPropagator ¶
func NewTextMapPropagator(pf PropagatorFormat) propagation.TextMapPropagator
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.