Skip to content
New issue

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

Add tracing sampling #11

Closed
komuw opened this issue Aug 29, 2023 · 0 comments · Fixed by #13
Closed

Add tracing sampling #11

komuw opened this issue Aug 29, 2023 · 0 comments · Fixed by #13

Comments

@komuw
Copy link
Owner

komuw commented Aug 29, 2023

In

otero/tracing.go

Lines 64 to 71 in bb23f8a

provider := trace.NewTracerProvider(
trace.WithBatcher(exporter), // use batch in prod.
trace.WithResource(resource),
trace.WithSpanProcessor(loggingSpanProcessor{}),
// see: https://github.com/komuw/otero/issues/11
// In prod, you should consider using the TraceIDRatioBased sampler with the ParentBased sampler.
// sdktrace.WithSampler(sdktrace.AlwaysSample()),
)

There's head-based sampling and tail-based sampling.

There is also filter processor that can be used in place of tail based sampling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant