Back to godoc.org

Package propagation

v0.20.0
Latest Go to latest

The highest tagged major version is .

Published: Apr 1, 2019 | License: Apache-2.0 | Module: go.opencensus.io

Overview

Package propagation implement X-Cloud-Trace-Context header propagation used by Google Cloud products.

Index

type HTTPFormat

type HTTPFormat struct{}

HTTPFormat implements propagation.HTTPFormat to propagate traces in HTTP headers for Google Cloud Platform and Stackdriver Trace.

func (*HTTPFormat) SpanContextFromRequest

func (f *HTTPFormat) SpanContextFromRequest(req *http.Request) (sc trace.SpanContext, ok bool)

SpanContextFromRequest extracts a Stackdriver Trace 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 a Stackdriver Trace header.

Package Files

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

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier