package
1.23.0-rc.1
Repository: https://github.com/seatgeek/dd-trace-go.git
Documentation: pkg.go.dev

# Functions

AnalyticsRate sets a custom analytics rate for a span.
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.
Measured marks this span to be measured for metrics and stats calculations.
NameRule returns a SamplingRule that applies the provided sampling rate to spans that match the operation name provided.
NameServiceRule returns a SamplingRule that applies the provided sampling rate to spans matching both the operation and service names provided.
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.
RateRule returns a SamplingRule that applies the provided sampling rate to all spans.
ResourceName sets the given resource name on the started span.
ServiceName sets the given service name on the started span.
ServiceRule returns a SamplingRule that applies the provided sampling rate to spans that match the service name provided.
SpanFromContext returns the span contained in the given context.
SpanType sets the given span type on the started span.
StackFrames limits the number of stack frames included into erroneous spans to n, starting from skip.
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.
WithAnalytics allows specifying whether Trace Search & Analytics should be enabled for integrations.
WithAnalyticsRate sets the global sampling rate for sampling APM events.
WithDebugMode enables debug mode on the tracer, resulting in more verbose logging.
WithDogstatsdAddress specifies the address to connect to for sending metrics to the Datadog Agent.
WithEnv sets the environment to which all traces started by the tracer will be submitted.
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.
WithLogger sets logger as the tracer's error printer.
WithPrioritySampling is deprecated, and priority sampling is enabled by default.
WithPropagator sets an alternative propagator to be used by the tracer.
WithRuntimeMetrics enables automatic collection of runtime metrics every 10 seconds.
WithSampler sets the given sampler to be used with the tracer.
WithSamplingRules specifies the sampling rates to apply to spans based on the provided rules.
WithService sets the default service name for the program.
WithServiceName is deprecated.
WithServiceVersion specifies the version of the service that is running.
WithSpanID sets the SpanID on the started span, instead of using a random number.

# 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.
SamplingRule is used for applying sampling rates to spans that match the service name, operation name or both.

# 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.