Documentation ¶
Overview ¶
Package tracecontext contains HTTP propagator for TraceContext standard. See https://github.com/w3c/distributed-tracing for more information.
Index ¶
- type HTTPFormat
- func (f *HTTPFormat) SpanContextFromHeaders(tp string, ts string) (sc trace.SpanContext, ok bool)
- func (f *HTTPFormat) SpanContextFromRequest(req *http.Request) (sc trace.SpanContext, ok bool)
- func (f *HTTPFormat) SpanContextToHeaders(sc trace.SpanContext) (tp string, ts string)
- func (f *HTTPFormat) SpanContextToRequest(sc trace.SpanContext, req *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPFormat ¶
type HTTPFormat struct{}
HTTPFormat implements the TraceContext trace propagation format.
func (*HTTPFormat) SpanContextFromHeaders ¶
func (f *HTTPFormat) SpanContextFromHeaders(tp string, ts string) (sc trace.SpanContext, ok bool)
SpanContextFromHeaders extracts a span context from provided header values.
func (*HTTPFormat) SpanContextFromRequest ¶
func (f *HTTPFormat) SpanContextFromRequest(req *http.Request) (sc trace.SpanContext, ok bool)
SpanContextFromRequest extracts a span context from incoming requests.
func (*HTTPFormat) SpanContextToHeaders ¶
func (f *HTTPFormat) SpanContextToHeaders(sc trace.SpanContext) (tp string, ts string)
SpanContextToHeaders serialize the SpanContext to traceparent and tracestate headers.
func (*HTTPFormat) SpanContextToRequest ¶
func (f *HTTPFormat) SpanContextToRequest(sc trace.SpanContext, req *http.Request)
SpanContextToRequest modifies the given request to include traceparent and tracestate headers.
Click to show internal directories.
Click to hide internal directories.