Skip to main content

1. Add traces

Call init() once at startup. Wrap each turn in the connection handler:
Pass the same session_id on every turn to group the whole conversation together.

2. Connect simulation

When Eldros runs a test scenario it opens a WebSocket connection with W3C traceparent + baggage headers on the HTTP upgrade request. Continue them once at connection start — they cover all turns on that connection:
On production connections (no Eldros headers) trace_context is a no-op — same handler for both. When the headers are present, every span is stamped with:
  • episode.id — links the trace to the specific test run
  • traffic_type="simulation" — keeps test traffic out of your production views
For simulation, t.reply() is optional — Eldros already has the transcript from the platform side. turn() is still required so each LLM/tool span is linked to the correct turn, giving you a structured trace even without the client-side transcript.

3. Integration modes

Simulation + production observability (recommended)
Full transcript and traces for both production and eval runs:
Simulation only
Only export during Eldros-driven test runs. Production connections go through normally but nothing is sent to the backend. t.reply() optional — platform has the transcript:
Production observability only
No simulation integration. Full transcript required since there is no platform-side record:
Traces without turn() — in any mode — cannot be correlated to specific conversation turns. The transcript is what gets judged; traces explain the verdict.