I am following langgraph integration tutorial with auto instrumentation. I see the traces fine but I see that graph is seen as one trace and LLM/Tool invocations (from within graph nodes) as separate traces. How do we connect everything that runs as part of graph.inoke() as a single trace ?
💡 Hint: Mention RunLLM in the thread for followups.
That is correct 🔒[private user]. In Traces tab, I see 3 traces for a single graph invocation - one for Langgraph, one for LLM and another for Tool.
yes, no manual instrumentation. I tried adding tracer.tool annotation but still it ends up as a separate trace. I am clearly missing something basic. ├── af-agent-sdk[bots, langchain, langgraph, tools] v0.6.10 │ ├── langgraph v0.3.21 (extra: langgraph) │ │ ├── langgraph-checkpoint v2.0.23 │ │ ├── langgraph-prebuilt v0.1.7 │ │ │ └── langgraph-checkpoint v2.0.23 (*) │ │ ├── langgraph-sdk v0.1.60 │ ├── openinference-instrumentation-langchain v0.1.37 (extra: langgraph) (*) ➜ genai-generic-agent git:(master) ✗ uv tree | grep -i arize Resolved 193 packages in 9ms │ ├── arize-phoenix-otel v0.9.0 ├── arize-phoenix v8.20.0 │ ├── arize-phoenix-client v1.1.0 │ ├── arize-phoenix-evals v0.20.4 │ ├── arize-phoenix-otel v0.9.0 (*) └── arize-phoenix v8.20.0 (group: dev) (*)
No, I have a custom graph. But when it was not working, I did come across that. I didn't see anything different being done in that notebook as far as instrumentaion is concerned ?
can you point me to that base langgraph example where it is working ? I can try to reproduce and see if I am doing anything different ?
In my exanple, I am not doing the bind_tools on chat model because I am implementing ReWoo. So, I understand if tools are not part of the same trace. But not understanding why Chat Model invocations are not part of the same trace.
I see LLM and Langgraph as two separate trace hierarchy for a single run
I am using ChatOpenAI model from langchain.
No. not seeing the LLM spans within Langgraph trace. Let me see if I can share a quick screenshot
4 Traces for a single graph run. Main Langgraph trace has multiple spans for different graph nodes. Couple of these graph nodes make LLM /Tool calls. And these are shown as 3 separate traces. When I expand the Langgraph trace, I don't see any LLM invocation span within it.
I ask, because one thing that could cause this would be multiple instrumentation packages in your environment that are both attempting to instrument your LLM calls
Let me check this
Not another tracing instrumentation, but I had another callback registered with Langgraph. I tried disabling it - still the same issue,
yes, correct
