Skip to content

fix(eve): Nest turns under the caller's propagated trace context - #2574

Merged
Abhijeet Prasad (AbhiPrasad) merged 3 commits into
mainfrom
lforst/dum-e/berlin-97c143c625
Oct 5, 2026
Merged

Abhijeet Prasad (AbhiPrasad) merged 3 commits into
mainfrom
lforst/dum-e/berlin-97c143c625

Conversation

@lforst

@lforst Luca Forstner (lforst) commented Oct 2, 2026 •

Copy link
Copy Markdown
Member
  • braintrustEveInstrumentation() records each Eve agent turn as an eve.turn span, with the model calls and tool calls of that turn as its children.
  • Before, an eve.turn was always a root span unless it belonged to an Eve subagent.
    • So when a traced service started an Eve session and passed its W3C traceparent header, the turn still showed up as its own separate trace.
    • Following one request meant jumping between traces by eve.session_id. Online scoring rules on the caller's span also couldn't see the agent's tool calls.
  • Eve already passes the caller's trace context to the instrumentation as parentTraceContext on its turn.started event, but the SDK ignored it.
  • Now, when a turn has a parentTraceContext and isn't a subagent turn, the eve.turn span becomes a child of the caller's span, inside the caller's trace.
    • Model and tool spans of the turn, and the turns of any subagents it calls, stay in that same trace too.
    • This is the same mapping the SDK already uses for incoming traceparent headers: the trace id becomes the root and the caller's span id becomes the parent.
    • The link to the caller's trace is saved in the state Eve persists, so it also holds when Eve replays the turn in another process.
  • Subagent turns are unchanged: they still nest under the tool call in the parent agent that started them.
  • In Eve 0.47 and later, Eve only reads traceparent on session creates that include a remote-subagent callback. Plain eve/client sessions won't nest until Eve forwards traceparent for those requests as well.
  • resolves Eve provider ignores parentTraceContext, so eve.turn is always a root span #2552

@AbhiPrasad
Abhijeet Prasad (AbhiPrasad) merged commit 833755c into main Oct 5, 2026
110 of 112 checks passed
@AbhiPrasad
Abhijeet Prasad (AbhiPrasad) deleted the lforst/dum-e/berlin-97c143c625 branch October 5, 2026 16:20
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.

Eve provider ignores parentTraceContext, so eve.turn is always a root span

2 participants