Back to godoc.org
go.opencensus.io/plugin/ochttp/propagation/tracecontext

package tracecontext

v0.22.4
Latest Go to latest
Published: Jun 17, 2020 | License: Apache-2.0 | Module: go.opencensus.io

Overview

Package tracecontext contains HTTP propagator for TraceContext standard. See https://github.com/w3c/distributed-tracing for more information.

Index

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