Add detached fan-out-instance error span test#179
Merged
Conversation
Guards proposal 0061's detached-invocation error behavior for a raising detached fan-out instance: ERROR plus the error category plus an OTel exception event on the detached instance's own invocation span, and ERROR on the parent-trace fan-out node span. Conformance fixture 008 case 3 covers only the detached-subgraph path; this fills the fan-out-instance gap on the python side (the v0.15.0 release-review item 2 follow-up).
There was a problem hiding this comment.
Pull request overview
Adds a unit test to guard OpenTelemetry span error propagation semantics for detached fan-out instances (proposal 0061 §4.2), ensuring both the detached instance invocation span and the parent fan-out node span are marked ERROR, and that the detached invocation span carries the error category and an exception event.
Changes:
- Add a new unit test that drives a detached fan-out instance failure and asserts span status/attributes/events on both the detached and parent traces.
- Locate the detached trace by keying off the raising inner node span (
compute) to disambiguate the twoscorespans emitted in detached fan-out mode.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Adds a unit test guarding proposal 0061's detached-invocation error behavior for a raising detached fan-out instance: ERROR plus the error category plus an OTel exception event on the detached instance's own invocation span, and ERROR on the parent-trace fan-out node span.
Conformance fixture 008 case 3 covers only the detached-subgraph path, so the fan-out-instance path was implemented (it reuses the same detached-invocation propagation, keyed on the per-instance key) but unguarded on the python side. This is the v0.15.0 release-review item 2 follow-up.
Writing the test confirmed the behavior is correct: an initial cut mis-identified the span (a detached fan-out emits two spans named after the fan-out node, the parent node span and the detached instance's root span), so the final test keys off the raising inner node to locate the detached trace. Test-only; no behavior change.