Repository navigation
refactor(tracing): normalize agent spans in Rust - #44071
Conversation
|
There was a problem hiding this comment.
Devin Review found 3 potential issues.
1 flag not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
@greptile-apps wdyt |
|
@greptile-apps The specific 3/5 rationale is not fair to this PR’s current diff. OTLP JSON identifier decoding was already on main; this PR leaves that code unchanged, and the existing hex ID fixture passes. This PR also changes no historical benchmark files. That work entered the merge base through #44057 |
ishaan-berri
left a comment
There was a problem hiding this comment.
can we add UI screenshots showing tracing still works ?
TLDR
Problem this solves:
How it solves it:
Merge preservation
#43975: the bounded OTLP receiver, shared resource identity, and paged span diagnostics remain covered by tracing and bridge tests
#44035: lifespan-owned tracing, access scoping, and shutdown draining pass the route, lifecycle, and storage tests
#44068: Lens trace access, setup polling, and investigations pass 56 focused dashboard tests
Review evidence
The native bridge returns
consumed_attributesas a Python tuple at the current tip. Direct execution with the LangSmith export returned('gen_ai.prompt', 'gen_ai.completion'); the bridge conversion test passesUser Flow
Before: a developer imports a LangSmith trace and inspects its agent and LLM spans
http://localhost:4097/v1/tracesand receive HTTP 200 with{}/v1/traces/4bad42b84e9de3ba46fc870185f8f023and see six spans, one LLM call, two tool calls, and 3332 input tokens/v1/traces/4bad42b84e9de3ba46fc870185f8f023/spans/8a6a1c31940d07afand see full tool call IDs and typesAfter: the same trace remains readable with the same fields while normalization runs in Rust
http://localhost:4098/v1/tracesand receive HTTP 200 with{}Pre-Submission checklist
Screenshots / Proof of Fix
Both runs used
tests/test_litellm/tracing/fixtures/langsmith_deep_agent_export.json, local proxies, and separate PostgreSQL and ClickHouse databasesBefore (a14af73)
curl -X POST http://127.0.0.1:4097/v1/traces -H 'Authorization: Bearer <local key>' -H 'Content-Type: application/json' --data-binary @tests/test_litellm/tracing/fixtures/langsmith_deep_agent_export.jsonreturned HTTP 200 and{}curl http://127.0.0.1:4097/v1/traces/4bad42b84e9de3ba46fc870185f8f023 -H 'Authorization: Bearer <local key>'returned HTTP 200 withspan_count=6,llm_calls=1,tool_calls=2,input_tokens=3332,output_tokens=467, and LLM request IDchatcmpl-4077bb36-9380-4a3b-9481-245700cef09acurl http://127.0.0.1:4097/v1/traces/4bad42b84e9de3ba46fc870185f8f023/spans/8a6a1c31940d07af -H 'Authorization: Bearer <local key>'returned HTTP 200 with full tool call IDs and typesAfter (246bf31)
{}Type
Refactoring
Final Attestation