fix(telemetry): preserve requests through instrumentation failures - #23
Draft
rschlaefli wants to merge 2 commits into
Draft
fix(telemetry): preserve requests through instrumentation failures#23rschlaefli wants to merge 2 commits into
rschlaefli wants to merge 2 commits into
Conversation
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.
Optional OpenTelemetry setup, propagation and span callbacks can currently prevent code requests from running or replace their results/errors. Guard those operations while preserving one domain invocation, original error identity, existing trace-header privacy and shutdown behavior.
Span setup degrades to the existing no-op facade; failed injection discards partial carrier writes. Middleware calls
nextonce, and completion instrumentation cannot leak errors through finish/close. Initialization remains one-shot with no retries or new dependencies.Validation: 52 focused API/service telemetry tests pass, including synthetic enabled-SDK faults across 19 injected failure points. Full API suite 386 and service suite 577 pass before the final fixture-only additions; the affected suite was rerun. Both package builds pass; service emits an existing replay-state cast warning. Scoped Opengrep runs 210 rules with no findings. No application or live exporter was used; screenshots do not apply to this nonvisual backend change.
Reviews: the risk-selected slice review passed with no findings at the 75-confidence threshold. The integrated final review passed with two low, non-blocking findings: a late-setup partial provider/processor shutdown leak that the plan explicitly returns to the parent shutdown scope, and an optional span-annotation maintainability note. The simplification audit (returned to the trusted main session under the documented continuity route) found no net simplification that preserves the fault matrix and exactly-once semantics.
Early draft; no merge, image publication or deployment authority is claimed. See
docs/project/2026-09-09-nonfatal-telemetry-plan.mdfor scope and acceptance.