propagation

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package propagation implements the binary trace context format.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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.

Types

type HTTPFormat

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

HTTPFormat implementations propagate span contexts in HTTP requests.

FromRequest extracts a span context from incoming requests.

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL