-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
URL
https://opentelemetry.io/docs/languages/go/sampling/
Description
As-written, this page currently explains that TracerProviders can be set up with Samplers and some useful Sampler primitives are already supplied (AlwaysSample, NeverSample, TraceIDRatioBased and ParentBased — these cover most sampling policies, so it's great to have them available out-of-the-box!)
Pedagogically, I think the page would be helped by a reference to the concepts of head-based and tail-based sampling.
More concretely, I find this phrasing unhelpful:
By default, the tracer provider uses a ParentBased sampler with the AlwaysSample sampler.
When in a production environment, consider using the ParentBased sampler with the TraceIDRatioBased sampler.
It's good to know samplers can be combined, but it doesn't explain how they should be combined, and I don't personally find it self-explanatory from the example which sets up a TracerProvider that uses a withSampler that only uses one of the four basic samplers. If you can use two samplers together, what's the way to do that?
While we're at it it would be nice if a corresponding page with examples for the Python SDK existed (that's what I'm really using, but I didn't see a Sampling page in the Python section sidebar)
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status