Versions in this module Expand all Collapse all v1 v1.71.0 Feb 22, 2023 Changes in this version + type And struct + func (c *And) Evaluate(traceID pcommon.TraceID, trace *TraceData) (Decision, error) + func (c *And) OnDroppedSpans(pcommon.TraceID, *TraceData) (Decision, error) + type Composite struct + func (c *Composite) Evaluate(traceID pcommon.TraceID, trace *TraceData) (Decision, error) + func (c *Composite) OnDroppedSpans(pcommon.TraceID, *TraceData) (Decision, error) + type Decision int32 + const Dropped + const Error + const InvertNotSampled + const InvertSampled + const NotSampled + const Pending + const Sampled + const Unspecified + type MonotonicClock struct + type PolicyEvaluator interface + Evaluate func(traceID pcommon.TraceID, trace *TraceData) (Decision, error) + func NewAlwaysSample(logger *zap.Logger) PolicyEvaluator + func NewAnd(logger *zap.Logger, subpolicies []PolicyEvaluator) PolicyEvaluator + func NewComposite(logger *zap.Logger, maxTotalSpansPerSecond int64, ...) PolicyEvaluator + func NewLatency(logger *zap.Logger, thresholdMs int64) PolicyEvaluator + func NewNumericAttributeFilter(logger *zap.Logger, key string, minValue, maxValue int64) PolicyEvaluator + func NewProbabilisticSampler(logger *zap.Logger, hashSalt string, samplingPercentage float64) PolicyEvaluator + func NewRateLimiting(logger *zap.Logger, spansPerSecond int64) PolicyEvaluator + func NewSpanCount(logger *zap.Logger, minSpans int32) PolicyEvaluator + func NewStatusCodeFilter(logger *zap.Logger, statusCodeString []string) (PolicyEvaluator, error) + func NewStringAttributeFilter(logger *zap.Logger, key string, values []string, regexMatchEnabled bool, ...) PolicyEvaluator + func NewTraceStateFilter(logger *zap.Logger, key string, values []string) PolicyEvaluator + type SubPolicyEvalParams struct + Evaluator PolicyEvaluator + MaxSpansPerSecond int64 + type TimeProvider interface + type TraceData struct + ArrivalTime time.Time + DecisionTime time.Time + Decisions []Decision + FinalDecision Decision + ReceivedBatches ptrace.Traces + SpanCount *atomic.Int64