propagation

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2019 License: Apache-2.0 Imports: 11 Imported by: 3,110

Documentation

Overview

Package propagation contains propagators for different format and carriers.

Index

Constants

View Source
const (
	B3SingleHeader       = "X-B3"
	B3DebugFlagHeader    = "X-B3-Flags"
	B3TraceIDHeader      = "X-B3-TraceId"
	B3SpanIDHeader       = "X-B3-SpanId"
	B3SampledHeader      = "X-B3-Sampled"
	B3ParentSpanIDHeader = "X-B3-ParentSpanId"
)
View Source
const (
	TraceparentHeader        = "Traceparent"
	CorrelationContextHeader = "Correlation-Context"
)

Variables

This section is empty.

Functions

func BinaryPropagator

func BinaryPropagator() apipropagation.BinaryFormatPropagator

BinaryPropagator creates a new propagator. The propagator implements ToBytes and FromBytes method to transform SpanContext to/from byte array.

Types

type HTTPB3Propagator

type HTTPB3Propagator struct {
	SingleHeader bool
}

HTTPB3Propagator that facilitates core.SpanContext propagation using B3 Headers. This propagator supports both version of B3 headers,

  1. Single Header : X-B3: {TraceId}-{SpanId}-{SamplingState}-{ParentSpanId}
  2. Multiple Headers: X-B3-TraceId: {TraceId} X-B3-ParentSpanId: {ParentSpanId} X-B3-SpanId: {SpanId} X-B3-Sampled: {SamplingState} X-B3-Flags: {DebugFlag}

If SingleHeader is set to true then X-B3 header is used to inject and extract. Otherwise, separate headers are used to inject and extract.

func (HTTPB3Propagator) Extract

Extract retrieves B3 Headers from the supplier

func (HTTPB3Propagator) GetAllKeys

func (b3 HTTPB3Propagator) GetAllKeys() []string

func (HTTPB3Propagator) Inject

func (b3 HTTPB3Propagator) Inject(ctx context.Context, supplier apipropagation.Supplier)

type HTTPTraceContextPropagator

type HTTPTraceContextPropagator struct{}

HTTPTraceContextPropagator propagates SpanContext in W3C TraceContext format.

func (HTTPTraceContextPropagator) Extract

func (HTTPTraceContextPropagator) GetAllKeys

func (hp HTTPTraceContextPropagator) GetAllKeys() []string

func (HTTPTraceContextPropagator) Inject

Jump to

Keyboard shortcuts

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