Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var IsTracing bool
Functions ¶
func InitTracing ¶
func InitTracing() func()
func Server ¶
func Server(opts ...Option) endpoint.Middleware
Server returns a new server middleware for OpenTelemetry.
Types ¶
type Metadata ¶
type Metadata struct{}
Metadata is tracing metadata propagator
func (Metadata) Extract ¶
func (b Metadata) Extract(parent context.Context, carrier propagation.TextMapCarrier) context.Context
Extract returns a copy of parent with the metadata from the carrier added.
func (Metadata) Inject ¶
func (b Metadata) Inject(ctx context.Context, carrier propagation.TextMapCarrier)
Inject sets metadata key-values from ctx into the carrier.
type Option ¶
type Option func(*options)
Option is tracing option.
func WithPropagator ¶
func WithPropagator(propagator propagation.TextMapPropagator) Option
WithPropagator with tracer propagator.
func WithTracerProvider ¶
func WithTracerProvider(provider trace.TracerProvider) Option
WithTracerProvider with tracer provider. Deprecated: use otel.SetTracerProvider(provider) instead.
Click to show internal directories.
Click to hide internal directories.