package
1.8.0
Repository: https://github.com/entropyx/dd-trace-go.git
Documentation: pkg.go.dev

# Functions

ChildOf tells StartSpan to use the given span context as a parent for the created span.
ContextWithSpan returns a copy of the given context which includes the span s.
Extract extracts a SpanContext from the carrier.
FinishTime sets the given time as the finishing time for the span.
Inject injects the given SpanContext into the carrier.
NewAllSampler is a short-hand for NewRateSampler(1).
NewPropagator returns a new propagator which uses TextMap to inject and extract values.
NewRateSampler returns an initialized RateSampler with a given sample rate.
NoDebugStack prevents any error presented using the WithError finishing option from generating a stack trace.
ResourceName sets the given resource name on the started span.
ServiceName sets the given service name on the started span.
SpanFromContext returns the span contained in the given context.
SpanType sets the given span type on the started span.
Start starts the tracer with the given set of options.
StartSpan starts a new span with the given operation name and set of options.
StartSpanFromContext returns a new span with the given operation name and options.
StartTime sets a custom time as the start time for the created span.
Stop stops the started tracer.
Tag sets the given key/value pair as a tag on the started Span.
WithAgentAddr sets the address where the agent is located.
WithDebugMode enables debug mode on the tracer, resulting in more verbose logging.
WithError marks the span as having had an error.
WithGlobalTag sets a key/value pair which will be set as a tag on all spans created by tracer.
WithHTTPRoundTripper allows customizing the underlying HTTP transport for emitting spans.
WithPrioritySampling is deprecated, and priority sampling is enabled by default.
WithPropagator sets an alternative propagator to be used by the tracer.
WithSampler sets the given sampler to be used with the tracer.
WithServiceName sets the default service name to be used with the tracer.

# Constants

DefaultBaggageHeaderPrefix specifies the prefix that will be used in HTTP headers or text maps to prefix baggage keys.
DefaultParentIDHeader specifies the key that will be used in HTTP headers or text maps to store the parent ID.
DefaultPriorityHeader specifies the key that will be used in HTTP headers or text maps to store the sampling priority value.
DefaultTraceIDHeader specifies the key that will be used in HTTP headers or text maps to store the trace ID.

# Variables

ErrInvalidCarrier is returned when the carrier provided to the propagator does not implemented the correct interfaces.
ErrInvalidSpanContext is returned when the span context found in the carrier is not of the expected type.
ErrSpanContextCorrupted is returned when there was a problem parsing the information found in the carrier.
ErrSpanContextNotFound represents missing information in the given carrier.

# Structs

PropagatorConfig defines the configuration for initializing a propagator.

# Interfaces

Propagator implementations should be able to inject and extract SpanContexts into an implementation specific carrier.
RateSampler is a sampler implementation which randomly selects spans using a provided rate.
Sampler is the generic interface of any sampler.
TextMapReader allows iterating over sets of key/value pairs.
TextMapWriter allows setting key/value pairs of strings on the underlying data structure.

# Type aliases

FinishOption is a configuration option for FinishSpan.
HTTPHeadersCarrier wraps an http.Header as a TextMapWriter and TextMapReader, allowing it to be used using the provided Propagator implementation.
Span is an alias for ddtrace.Span.
StartOption represents a function that can be provided as a parameter to Start.
StartSpanOption is a configuration option for StartSpan.
TextMapCarrier allows the use of a regular map[string]string as both TextMapWriter and TextMapReader, making it compatible with the provided Propagator.