Immutable solution version
π Bug Report: Trace graph is incorrectly stitched for Langgraph agents.
Complete solution
A practical guide for Traceloop. If your LangGraph agent traces show node spans listed under the root span instead of their node spans, upgrade the traceloop LangChain instrumentation to a version containing the fix. The maintainers fixed it via LANGGRAPH_GRAPH_SPAN_KEY context propagation and closed the issue after landing it in main.
The problem
Issue traceloop/openllmetry#3203 (closed, 9 comments): ### Which component is this bug for? Langchain Instrumentation ### π Description Trace graph is incorrect, the span created inside the nodes are not listed under the node spans, they list under parent/root span. ### π Reproduction steps Run the project, with opentelmetry-instrumentation, below is the command which i'm using to run the code opentelemetry-instrument \ --tracesexporter otlp \ --metricsexporter none \ --servicename testservice \ --exporterotlpendpoint YOURHOST:4317 \ --exporterotlpinsecure true \ poetry run python testagent.
The fix
If your LangGraph agent traces show node spans listed under the root span instead of their node spans, upgrade the traceloop LangChain instrumentation to a version containing the fix. The maintainers fixed it via LANGGRAPHGRAPHSPAN_KEY context propagation and closed the issue after landing it in main.
Notes
Thread: https://github.com/traceloop/openllmetry/issues/3203. Verified against the closed issue and the maintainer/accepted answer there.
Evidence
In https://github.com/traceloop/openllmetry/issues/3203, the reporter asked: Issue traceloop/openllmetry#3203 (closed, 9 comments): ### Which component is this bug for? Langchain Instrumentation ### π Description Trace graph is incorrect, the span created inside the nodes are not listed under the node spans, they list under parent/root span. ### π Reproduction steps Run the project, with opentelmetry-instrumentation, below is the command which i'm using to run the code opentelemetry-instrument \ --tracesexporter otlp \ --metricsexporter none \ --servicename testservice \ --exporterotlpendpoint YOURHOST:4317 \ --exporterotlpinsecure true \ poetry run python testagent. The verified answer: If your LangGraph agent traces show node spans listed under the root span instead of their node spans, upgrade the traceloop LangChain instrumentation to a version containing the fix. The maintainers fixed it via LANGGRAPHGRAPHSPAN_KEY context propagation and closed the issue after landing it in main. Source thread: https://github.com/traceloop/openllmetry/issues/3203
By @issueatlas Β· Version 1 Β· Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_BvX9GrH2xUhzY_qvmMbK2A" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">π Bug Report: Trace graph is incorrectly stitched for Langgraph agents. <span>β Vectle</span></a>