We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://opentelemetry.io/docs/languages/go/sampling/
The last statement in the document is unclear. It's not clear how to use the ParentBased sampler with the TraceIDRatioBased sampler.
ParentBased
TraceIDRatioBased
An example would be handy.
I'm guessing here but to setup a 1% sampler, both parent and child services would configure this:
provider := trace.NewTracerProvider( trace.WithSampler(trace.ParentBased(trace.WithRemoteParentSampled(trace.TraceIDRatioBased(.01)))), )
Or, is it more like this?
// In parent application: provider := trace.NewTracerProvider( trace.WithSampler(trace.TraceIDRatioBased(.01)), ) // In child application provider := trace.NewTracerProvider()
Do we need to apply the same sampler to both?
// In parent application: provider := trace.NewTracerProvider( trace.WithSampler(trace.TraceIDRatioBased(.01)), ) // In child application provider := trace.NewTracerProvider( trace.WithSampler(trace.ParentBased(trace.TraceIDRatioBased(.01))), )
The text was updated successfully, but these errors were encountered:
Thanks for providing feedback and seeking clarification, @JRobTS!
@open-telemetry/go-approvers, PTAL.
Sorry, something went wrong.
You need to configure sampling for each application in exactly the same way, yes.
I'd recommend, if doing head sampling like this, to use environment variables instead.
No branches or pull requests
URL
https://opentelemetry.io/docs/languages/go/sampling/
Description
The last statement in the document is unclear. It's not clear how to use the
ParentBased
sampler with theTraceIDRatioBased
sampler.An example would be handy.
I'm guessing here but to setup a 1% sampler, both parent and child services would configure this:
Or, is it more like this?
Do we need to apply the same sampler to both?
The text was updated successfully, but these errors were encountered: