open-telemetry / opentelemetry-go-contrib

Collection of extensions for OpenTelemetry-Go.
https://opentelemetry.io/
Apache License 2.0
1.14k stars 542 forks source link

Request more fine-grained control for remote sampling #6127

Open garrettlish opened 2 days ago

garrettlish commented 2 days ago

Problem Statement

The PerOperationSampler provides operation-level customized sampling probabilities but lacks support for more fine-grained control, such as adjusting sampling probabilities based on specific tag key-value pairs (see sampling.proto).

For instance, in a real-world scenario, we might want to enforce sampling for a particular user session by customizing sampling probabilities based on specific tag key-value pairs.

Proposed Solution

Introduce a tag key-value pair in OperationSamplingStrategy to enable fine-grained control for remote sampling.

dmathieu commented 1 day ago

cc @yurishkuro as codeowner of the jaegerremote sampler.