otel

package
v0.0.0-...-4abda61 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2025 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartTracer

func StartTracer(ctx context.Context, serviceName, otelURL string) error

Types

type TraceContext

type TraceContext struct{}

TraceContext is a propagator that supports the W3C Trace Context format (https://www.w3.org/TR/trace-context/)

This propagator will propagate the traceparent and tracestate headers to guarantee traces are not broken. It is up to the users of this propagator to choose if they want to participate in a trace by modifying the traceparent header and relevant parts of the tracestate header containing their proprietary information.

func (TraceContext) Extract

Extract reads tracecontext from the carrier into a returned Context.

The returned Context will be a copy of ctx and contain the extracted tracecontext as the remote SpanContext. If the extracted tracecontext is invalid, the passed ctx will be returned directly instead.

func (TraceContext) Fields

func (tc TraceContext) Fields() []string

Fields returns the keys who's values are set with Inject.

func (TraceContext) Inject

func (tc TraceContext) Inject(ctx context.Context, carrier propagation.TextMapCarrier)

Inject set tracecontext from the Context into the carrier.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL