Skip to content

Commit 6df29f7

Browse files
Update resolver docstring, drop test double-end
PR review follow-ups: - _resolve_llm_parent docstring now lists the per-instance fan-out dispatch fallback added in this PR. - Drop the manual dispatch_span.end() in the new test: shutdown() drains fan_out_instance_spans and ends the span, so the manual end double-ended it.
1 parent 718d03a commit 6df29f7

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/openarmature/observability/otel/observer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1752,8 +1752,8 @@ def _resolve_llm_parent(
17521752
calling_branch_name: str | None,
17531753
) -> object:
17541754
"""Look up the calling node's span using the calling-node
1755-
identity, fall back through subgraph dispatch / invocation
1756-
span."""
1755+
identity, falling back through the per-instance fan-out dispatch
1756+
span, subgraph dispatch / detached root, and the invocation span."""
17571757
# 1. Direct match on the calling node's ``_StackKey``.
17581758
calling_key: _StackKey = (
17591759
calling_namespace_prefix,

tests/unit/test_observability_otel.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,8 @@ async def test_llm_span_parents_under_fan_out_instance_dispatch() -> None:
601601
branch_name=None,
602602
)
603603
)
604-
dispatch_span.end()
604+
# dispatch_span is ended by observer.shutdown() below (it drains
605+
# fan_out_instance_spans); ending it here too would double-end it.
605606
finally:
606607
_reset_invocation_id(token)
607608

0 commit comments

Comments
 (0)