How do I trace a LangGraph agent?

LangGraph traces through LangSmith, not through a built-in OpenTelemetry exporter, so reaching your own backend means turning on LangSmith’s OTLP export rather than pointing a generic OTel SDK at the graph. Set LANGSMITH_TRACING=true and LANGSMITH_OTEL_ENABLED=true, then point OTEL_EXPORTER_OTLP_ENDPOINT at your collector: LangSmith exports the same spans it always recorded, over the standard protocol, instead of keeping them in its own UI only.

Because LangGraph saves state after every step, keyed by a thread id, each node’s span identifies exactly where in the graph a run was when it produced a given output, not just that the agent as a whole did something. That’s also what real replay depends on: rewinding to a saved checkpoint and running forward again with the exact state the graph had at the time, rather than a reconstruction from a paraphrased retry. It’s the same instrumentation job any agent needs, just scoped to one node instead of one whole turn, which is what makes “the router picked the wrong branch” a separate, gradeable finding from “the final answer was wrong.”

sources

keep reading

More on this.

Two ways to run Tessary.

Tessary is an open-source agent reliability platform. Cloud and self-hosted run the same workflow on the OpenTelemetry traces your agent already emits.

Tessary Cloud

We host it for you. Send your first trace with nothing to deploy and no model key.

what's includedper organization
traces
10,000 per calendar month
stored trace data
1 GB
retention
30 days
model credit
$10, one-time, for triage and root-cause analysis
credit card
not required

Self-hosted Tessary

Run the open-source code on your own infrastructure with one command. Add your own model key for triage and root-cause analysis.

Self-host Tessary for me by following https://github.com/tessaryai/tessary/blob/main/setup.md

docker compose -f oci://docker.io/tessaryai/tessary:compose up -d -y