Repository navigation
refactor(telemetry): auth and the SDK share one client span, so they can't drift apart - #310
Merged
PiquelChips merged 2 commits intoNov 2, 2026
Conversation
|
Caution Review failedThe pull request is closed.
Warning Some tools did not complete. Review the errors below.
|
Moves SendTraced into piquel-common behind a client-spans feature, so the Rust SDK sends its requests through it instead of a copy of its span. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PiquelChips
force-pushed
the
refactor/shared-client-span
branch
from
November 2, 2026 18:04
233d544 to
4ecd09c
Compare
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.
Stacked on #309.
#309 left two copies of the client span code: auth's
SendTracedand the one the Rust SDK grew for itself. They can drift apart, and reviewing #309 showed they already had: both recorded the status code as au16, which tracing-opentelemetry exports as a string. That's fixed in #309. This PR leaves a single copy so it can't happen again.SendTracednow lives inpiquel-common, behind a newclient-spansfeature, which both auth and the SDK already depend on.piquel-telemetryre-exports it, so auth's.send_traced()callers don't change. The SDK'sHttp::sendnow calls it too.Changes in behavior:
piquel_commontarget rather thanpiquel_auth. The SDK docs say so.piquel-telemetryenables that target itself, so thepiquel_auth=infofilter that fix(auth): Google's signing-key fetch shows up in sign-in traces #309 added to auth is gone again.Proof: the test from #309,
google_key_fetch_is_a_client_span_of_its_request, now exercises the sharedSendTraced. It checks that the span sits under its request, records method, host and status (as an integer), and contains no path or query. It passes.piquel-telemetryandpiquel-authtests pass, clippy is clean, andcargo docwith-D warningsis clean with and without the feature. The net change removes code: 60 lines added, 76 removed.Reviewed with review-loop: 2 rounds with 2× GPT-6.1 Sol and Claude Opus 5.5. Verdict: approved
Note
Written by Claude Opus 5.5 in Claude Code and reviewed by GPT-6.1 Sol and Claude Opus 5.5 (via T3 Code)
🤖 Generated with Claude Code