Documentation ¶
Overview ¶
Package telemetry provides the telemetry for fleet components.
Index ¶
Constants ¶
View Source
const ( // EnvTraceID is the environment variable key for the trace ID EnvTraceID = "DATADOG_TRACE_ID" // EnvParentID is the environment variable key for the parent ID EnvParentID = "DATADOG_PARENT_ID" )
Variables ¶
This section is empty.
Functions ¶
func EnvFromSpanContext ¶
func EnvFromSpanContext(spanCtx ddtrace.SpanContext) []string
EnvFromSpanContext returns the environment variables for the span context.
func SpanContextFromContext ¶
func SpanContextFromContext(ctx context.Context) (ddtrace.SpanContext, bool)
SpanContextFromContext extracts the span context from the context if available.
func SpanContextFromEnv ¶
func SpanContextFromEnv() (ddtrace.SpanContext, bool)
SpanContextFromEnv injects the traceID and parentID from the environment into the context if available.
Types ¶
type Option ¶
type Option func(*Telemetry)
Option is a functional option for telemetry.
func WithSamplingRules ¶
func WithSamplingRules(rules ...tracer.SamplingRule) Option
WithSamplingRules sets the sampling rules for the telemetry.
type Telemetry ¶
type Telemetry struct {
// contains filtered or unexported fields
}
Telemetry handles the telemetry for fleet components.
func NewTelemetry ¶
func NewTelemetry(client *http.Client, apiKey string, site string, service string, opts ...Option) (*Telemetry, error)
NewTelemetry creates a new telemetry instance
Click to show internal directories.
Click to hide internal directories.