go.opencensus.io: go.opencensus.io/trace/propagation Index | Files

package propagation

import "go.opencensus.io/trace/propagation"

Package propagation implements the binary trace context format.

Index

Package Files

propagation.go

func Binary Uses

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 Uses

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 Uses

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 propagation imports 2 packages (graph) and is imported by 22 packages. Updated 2019-02-24. Refresh now. Tools for package owners.