Skip to content

Add child span handling to OpenAIAgentsTraceProcessor#1361

Open
colinbennettbrain wants to merge 2 commits intomainfrom
OpenAIAgentsTraceProcessor
Open

Add child span handling to OpenAIAgentsTraceProcessor#1361
colinbennettbrain wants to merge 2 commits intomainfrom
OpenAIAgentsTraceProcessor

Conversation

@colinbennettbrain
Copy link
Contributor

The fix updates OpenAIAgentsTraceProcessor.onTraceEnd() to end any child spans still tracked for the trace before deleting trace state, so spans don’t stay “in progress” if onTraceEnd runs before deferred onSpanEnd. It also adds regression tests covering the race path, late onSpanEnd no-op behavior, and multiple remaining child spans being closed correctly.

…ement logic to end any open child spans when a trace ends. This addresses a potential race condition between onTraceEnd and onSpanEnd.
Ensure pre-commit formatting checks pass in CI by applying canonical line-wrapping to updated assertions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant