Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultTraceIDHeader specifies the key that will be used in HTTP headers // or text maps to store the trace ID. DefaultTraceIDHeader = "x-datadog-trace-id" // DefaultParentIDHeader specifies the key that will be used in HTTP headers // or text maps to store the parent ID. DefaultParentIDHeader = "x-datadog-parent-id" // DefaultPriorityHeader specifies the key that will be used in HTTP headers // or text maps to store the sampling priority value. DefaultPriorityHeader = "x-datadog-sampling-priority" )
Variables ¶
View Source
var ErrDuplicatedHeaderKey = errors.New("duplicated header key")
Functions ¶
func New ¶
func New(cfg ...configFn) (propagation.TextMapPropagator, error)
New returns a new propagator which uses TextMap to inject and extract values. It propagates trace and span IDs. To use the defaults, call with nothing.
func NewDefault ¶
func NewDefault() propagation.TextMapPropagator
NewDefault returns a new propagator with default configuration which uses TextMap to inject and extract values. It propagates trace and span IDs.
func WithHeaderKey ¶
func WithHeaderKey(value HeaderKey) configFn
func WithHeaderValueConverter ¶
func WithHeaderValueConverter(headerConv HeaderValueConverterPort) configFn
Types ¶
type HeaderKey ¶
type HeaderKey struct { // TraceID specifies the key that will be used to store the trace ID. // It defaults to DefaultTraceIDHeader. TraceID string // ParentID specifies the key that will be used to store the parent ID. // It defaults to DefaultParentIDHeader. ParentID string // SampledPriority specifies the key that will be used to store the sampling priority. // It defaults to DefaultPriorityHeader. SampledPriority string }
type HeaderValueConverterPort ¶
type HeaderValueConverterPort interface {
// contains filtered or unexported methods
}
func NewHeaderConvBinary ¶
func NewHeaderConvBinary() HeaderValueConverterPort
func NewHeaderConvString ¶
func NewHeaderConvString() HeaderValueConverterPort
Click to show internal directories.
Click to hide internal directories.