Back to

package tracecontext

Latest Go to latest
Published: Jun 17, 2020 | License: Apache-2.0 | Module:


Package tracecontext contains HTTP propagator for TraceContext standard. See for more information.


type HTTPFormat

type HTTPFormat struct{}

HTTPFormat implements the TraceContext trace propagation format.

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) SpanContextToRequest

func (f *HTTPFormat) SpanContextToRequest(sc trace.SpanContext, req *http.Request)

SpanContextToRequest modifies the given request to include traceparent and tracestate headers.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
f or F : Jump to identifier