envoyproxy / envoyproxy/envoy

proposal: a new Opentelemetry sampler to support consistent probability sampling

Open
#47,070 2 comments 0 reactions 0 assignees View on GitHub
area/opentelemetry enhancement
Dominant language
C++
Stars
28.9k
Forks
5.6k
Avg merge
1d 20h
Merged PRs (30d)
437

Description

*Title*:
*proposal: a new Opentelemetry sampler to support consistent probability sampling*

*Description*:
A proposal to add a new OTEL sampler to support consistent probability sampling according to OTEL documentation https://opentelemetry.io/docs/specs/otel/trace/tracestate-probability-sampling/#consistent-sampling-decision .

The existing implementations aren't allowing to implement consistent sampling.

The sampler should implement Opentelemetry spec and use `tracestate` header with `ot` context to propagate data required for a consistent probability decision (rejection threshold and randomness value) on each stage (e.g. OTEL collectors or service level samplers)

```
tracing:
provider:
name: envoy.tracers.opentelemetry
typed_config:
"@type": type.googleapis.com/envoy.config.trace.v3.OpenTelemetryConfig
grpc_service: { ... }
sampler:
name: envoy.tracers.opentelemetry.samplers.consistent_probability_based
typed_config:
"@type": type.googleapis.com/envoy.extensions.tracers.opentelemetry.samplers.v3.ConsistentProbabilityBasedSamplerConfig
sampling_probability: 0.1
```

*Relevant Links*:
>Any extra documentation required to understand the issue.
- Opentelemetry consistent sampling documentation https://opentelemetry.io/docs/specs/otel/trace/tracestate-probability-sampling/#consistent-sampling-decision
- Opentelemetry collector probabilistic sampler processor https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/processor/probabilisticsamplerprocessor/README.md

Contributor guide

Open the contributing guide

Research direction

Start with the linked OpenTelemetry consistent sampling specification and the opentelemetry-collector-contrib probabilistic sampler processor README. Use the proposed consistent_probability_based sampler and ConsistentProbabilityBasedSamplerConfig entry points as the scope; done means supporting the specified tracestate ot context data for consistent probability decisions across sampling stages.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
observability-sre
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.