Documentation ¶
Overview ¶
Package tracer provides a global OpenTelemetry tracer.
Index ¶
- func Init(opts ...func(*options)) (func(context.Context) error, error)
- func Start(ctx context.Context, spanName string, opts ...trace.SpanStartOption) (context.Context, trace.Span)
- func WithJaeger(addr string) func(*options)
- func WithJaegerOrNoop(jaegerAddr string) func(*options)
- func WithStdOut(w io.Writer) func(*options)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Start ¶
func Start(ctx context.Context, spanName string, opts ...trace.SpanStartOption) (context.Context, trace.Span)
Start creates a span and a context.Context containing the newly-created span from the global tracer. See go.opentelemetry.io/otel/trace#Start for more details.
func WithJaeger ¶
func WithJaeger(addr string) func(*options)
WithJaeger returns an option to configure an OpenTelemetry tracing exporter for Jaeger.
func WithJaegerOrNoop ¶
func WithJaegerOrNoop(jaegerAddr string) func(*options)
WithJaegerOrNoop returns an option to configure an OpenTelemetry tracing exporter for Jaeger if the address is not empty, else the default noop tracer is retained.
func WithStdOut ¶
WithStdOut returns an option to configure an OpenTelemetry exporter for tracing telemetry to be written to an output destination as JSON.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.