Back to godoc.org
go.opencensus.io / trace / propagation

Package propagation

v0.5.0
Latest Go to latest

The highest tagged major version is .

Published: Mar 18, 2018 | License: Apache-2.0 | Module: go.opencensus.io

Overview

Package propagation implements the binary trace context format.

Index

func Binary

func Binary(sc trace.SpanContext) []byte

Binary returns the binary format representation of a SpanContext.

If sc is the zero value, Binary returns nil.

func FromBinary

func FromBinary(b []byte) (sc trace.SpanContext, ok bool)

FromBinary returns the SpanContext represented by b.

If b has an unsupported version ID or contains no TraceID, FromBinary returns with ok==false.

type HTTPFormat

type HTTPFormat interface {
	SpanContextFromRequest(req *http.Request) (sc trace.SpanContext, ok bool)
	SpanContextToRequest(sc trace.SpanContext, req *http.Request)
}

HTTPFormat implementations propagate span contexts in HTTP requests.

SpanContextFromRequest extracts a span context from incoming requests.

SpanContextToRequest modifies the given request to include the given span context.

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