Versions in this module Expand all Collapse all v1 v1.20.1 Jan 15, 2020 Changes in this version + const DefaultBaggageHeaderPrefix + const DefaultParentIDHeader + const DefaultPriorityHeader + const DefaultTraceIDHeader + var ErrInvalidCarrier = errors.New("invalid carrier") + var ErrInvalidSpanContext = errors.New("invalid span context") + var ErrSpanContextCorrupted = errors.New("span context corrupted") + var ErrSpanContextNotFound = errors.New("span context not found") + func ContextWithSpan(ctx context.Context, s Span) context.Context + func Extract(carrier interface{}) (ddtrace.SpanContext, error) + func Inject(ctx ddtrace.SpanContext, carrier interface{}) error + func Start(opts ...StartOption) + func Stop() + type FinishOption = ddtrace.FinishOption + func FinishTime(t time.Time) FinishOption + func NoDebugStack() FinishOption + func StackFrames(n, skip uint) FinishOption + func WithError(err error) FinishOption + type HTTPHeadersCarrier http.Header + func (c HTTPHeadersCarrier) ForeachKey(handler func(key, val string) error) error + func (c HTTPHeadersCarrier) Set(key, val string) + type Propagator interface + Extract func(carrier interface{}) (ddtrace.SpanContext, error) + Inject func(context ddtrace.SpanContext, carrier interface{}) error + func NewPropagator(cfg *PropagatorConfig) Propagator + type PropagatorConfig struct + BaggagePrefix string + ParentHeader string + PriorityHeader string + TraceHeader string + type RateSampler interface + Rate func() float64 + SetRate func(rate float64) + func NewAllSampler() RateSampler + func NewRateSampler(rate float64) RateSampler + type Sampler interface + Sample func(span Span) bool + type Span = ddtrace.Span + func SpanFromContext(ctx context.Context) (Span, bool) + func StartSpan(operationName string, opts ...StartSpanOption) Span + func StartSpanFromContext(ctx context.Context, operationName string, opts ...StartSpanOption) (Span, context.Context) + type StartOption func(*config) + func WithAgentAddr(addr string) StartOption + func WithAnalytics(on bool) StartOption + func WithAnalyticsRate(rate float64) StartOption + func WithDebugMode(enabled bool) StartOption + func WithDogstatsdAddress(addr string) StartOption + func WithEnv(env string) StartOption + func WithGlobalTag(k string, v interface{}) StartOption + func WithHTTPRoundTripper(r http.RoundTripper) StartOption + func WithLogger(logger ddtrace.Logger) StartOption + func WithPrioritySampling() StartOption + func WithPropagator(p Propagator) StartOption + func WithRuntimeMetrics() StartOption + func WithSampler(s Sampler) StartOption + func WithServiceName(name string) StartOption + type StartSpanOption = ddtrace.StartSpanOption + func ChildOf(ctx ddtrace.SpanContext) StartSpanOption + func ResourceName(name string) StartSpanOption + func ServiceName(name string) StartSpanOption + func SpanType(name string) StartSpanOption + func StartTime(t time.Time) StartSpanOption + func Tag(k string, v interface{}) StartSpanOption + func WithSpanID(id uint64) StartSpanOption + type TextMapCarrier map[string]string + func (c TextMapCarrier) ForeachKey(handler func(key, val string) error) error + func (c TextMapCarrier) Set(key, val string) + type TextMapReader interface + ForeachKey func(handler func(key, val string) error) error + type TextMapWriter interface + Set func(key, val string)