HTTPFormat implements the TraceContext trace propagation format.
type HTTPFormat struct{}
func (f *HTTPFormat) SpanContextFromHeaders(tp string, ts string) (sc trace.SpanContext, ok bool)
SpanContextFromHeaders extracts a span context from provided header values.
func (f *HTTPFormat) SpanContextFromRequest(req *http.Request) (sc trace.SpanContext, ok bool)
SpanContextFromRequest extracts a span context from incoming requests.
func (f *HTTPFormat) SpanContextToHeaders(sc trace.SpanContext) (tp string, ts string)
SpanContextToHeaders serialize the SpanContext to traceparent and tracestate headers.
func (f *HTTPFormat) SpanContextToRequest(sc trace.SpanContext, req *http.Request)
SpanContextToRequest modifies the given request to include traceparent and tracestate headers.