Repository navigation
feat(otel-collector-tailsampling): keep shared snowplow upstream requests whole (0.1.13) - #173
Merged
Merged
Conversation
…ests whole (0.1.13) snowplow #1322 lets concurrent readers of the same upstream call share one wire request; each joiner's request span links to the shared request's client span. snowplow is sampled at 5% and the two traces are sampled independently, so a kept joiner's link would resolve only ~5% of the time. snowplow will set snowplow.upstream.joiners (int, > 0 only) on the shared client span; the new keep rule keeps that trace whole so every link has a target. Joiners stay sampled. Matches nothing until snowplow ships #1322. tests/tailsampling-docker.py: shared request kept; unshared, joiners=0 and a joiner-only trace stay sampled. Against main's chart the shared case is dropped, as it should be. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N8HNbDgLwRKg9uhTx5o6pn
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
snowplow #1322, due after 1.12.71, lets concurrent readers of the same upstream call (same credential, in flight together) share one wire request. Each reader answered by someone else's request gets a span link on its own request span, pointing to the shared request's CLIENT span.
snowplow is a 5%-sampled service in this tail sampler. The joiner's trace and the shared request's trace are separate and sampled independently, so a kept joiner's link would resolve only about 5% of the time.
What
snowplow-shared-upstream. It keeps a trace whole when a span carriessnowplow.upstream.joiners > 0. snowplow agreed to set that attribute (an int count of other readers answered, present only when > 0) on the shared client span before it ends./debug/varscounters from its first hour.Test
tests/tailsampling-docker.pyadds four cases:snowplow.upstream.joiners=2)joiners=0(never emitted; a guard)All existing checks still pass. Negative control: against main's chart, the shared case is dropped.
🤖 Generated with Claude Code
https://claude.ai/code/session_01N8HNbDgLwRKg9uhTx5o6pn