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

chore: add passive sampling option to tracing #63

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

lbarthon
Copy link
Contributor

When we have many services in the same flow, we want to defer the sampling logic to the parent service (which will defer to the root service in the end).

The PassiveSampler is really good for that, as it will only sample traces that have one external reference. This assumes that the parent service will send the trace info to stitch, if we should keep it, and won't, if we should discard it. This is what some of our services do already today, and it would really help us onboard to foundations!

This needs cloudflare/rustracing#2 merged & cf-rustracing bumped in order to compile and work fine.

foundations/src/telemetry/settings/tracing.rs Outdated Show resolved Hide resolved
foundations/src/telemetry/settings/tracing.rs Outdated Show resolved Hide resolved
foundations/src/telemetry/tracing/init.rs Outdated Show resolved Hide resolved
When we have many services in the same flow, we want to defer the sampling
logic to the parent service (which will defer to the root service in the end).

The PassiveSampler is really good for that, as it will only sample traces that
have one external reference. This assumes that the parent service will send the
trace info to stitch, if we should keep it, and won't, if we should discard it.
This is what some of our services do already today, and it would really help us
onboard to foundations!

This also fixes the previous rate limiting test, that would always return an
empty traces list, as they were sent to a non-existent scope.
@inikulin inikulin merged commit 9f9b4b7 into cloudflare:main Aug 27, 2024
17 checks passed
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 this pull request may close these issues.

2 participants