Documentation
¶
Overview ¶
Package minitrace contains primitives to support propagation of tracing information.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HTTPExtractor ¶
HTTPExtractor allows spans to be propagated via HTTP requests.
SpanFromReq returns a span from the incoming HTTP request. If the incoming request doesn't contain trace information, a nil span is returned with no errors.
type HTTPInjector ¶
HTTPInjector allows spans to be extracted from the incoming HTTP requests.
SpanToReq mutates the outgoing request with the span, and returns a shallow copy of the request. If span is nil, req is not mutated.
type HTTPInjectorExtractor ¶
type HTTPInjectorExtractor interface { HTTPInjector HTTPExtractor }
HTTPInjectorExtractor combines span injection and extraction.
type Span ¶
Span represents a unit of work.
ID identifies a span globally in a tracing system.
Annotations return the labels propagated with the span. Encoding method might be tracing-backend specific.
func FromContext ¶
FromContext returns the span from the context.