Override the parentbased_traceIdRatio
sampled decision
#8809
Replies: 2 comments 1 reply
-
You should be able to do that by implementing a custom sampler that makes the decision you want, or delegates to the A word of warning though: if you decide to start sampling in the middle of an otherwise |
Beta Was this translation helpful? Give feedback.
-
If you are using the Java agent, then you will need to write an extension in order to provide your own custom sampler, check out https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/examples/extension |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, we are using
parentbased_traceIdRatio
sampler and '0.3' (30 %) ratio configured as env variables and the sampler is working fine by sampling probabilistic 30% of traces and dropping the remaining 70% traces.Is there a way to override the sampled decision of a request (trace) on conditional based check.
For e.g.:
Assume that a request flows from Service1 > Service2 > Service3 (provided all of them are already auto-instrumented and all of them have the same sampling strategy configured.
Is there way to override the sampled decision at any stage (of the above services) during the request execution? If so, can you please provide pointers to override the sampled decision for e.g.: from
drop
tosample
(record).If overriding the sampled decision is not possible then can you please provide your recommendations to this use case.
Beta Was this translation helpful? Give feedback.
All reactions