According to the document
- "traceidratio": TraceIdRatioBased
- "parentbased_traceidratio": ParentBased(root=TraceIdRatioBased)
What I understood:
traceidratio
will do sampling irrespective of whether sampling is done at source/parent. (Meaning: a sampled trace be sampled again??)parentbased_traceidratio
would respect the sampling flag on the basis of the parent.
But doesn't seem so I think. What is the difference between the two?
Background:
Setting sampling on istio
to 100
and setting the environment variable to OTEL_TRACES_SAMPLER
to traceidratio
or parentbased_traceidratio
and OTEL_TRACES_SAMPLER_ARG
to 0.001
did not show any reduction/sampling from the application itself. (All traces we available on jaeger indicating there was no reduction or sampling). A simple python based app that uses open-telemetry-python. setting OTEL to debug logs did not show anything specific either.
By documentation setting the env variables should change the sampling of traces in the application.