Start free

LangGraph integration

Observability for LangGraph agents

Trace your LangGraph agents in production. Inspect tool calls and complete sessions, detect recurring failures, and turn real traces into evals.

ADD TRACING TO YOUR GRAPH

import os
import langchain_core
from latitude_telemetry import Latitude, capture

latitude = Latitude(
    api_key=os.environ["LATITUDE_API_KEY"],
    project=os.environ["LATITUDE_PROJECT_SLUG"],
    instrumentations={"langchain": langchain_core},
)

from my_app.graph import graph  # your compiled LangGraph

capture(
    "support-agent-turn",
    lambda: graph.invoke({"messages": messages}),
    {"session_id": conversation_id, "user_id": user_id},
)

Works directly with LangGraph through the Latitude SDK's LangChain instrumentation, or over OpenTelemetry. No LangSmith account required.

What your LangGraph traces turn into

Complete sessions you can follow end to end, with the recurring failures already grouped for you.

Three steps to your first trace

Initialize the SDK and wrap your entrypoint. The graph itself stays untouched: Latitude observes the LangChain callback manager LangGraph already runs every node through.

1

Install the SDK

One package. Python 3.11+ or TypeScript.

2

Instrument

The snippet at the top of this page is the whole integration: initialize Latitude before your graph modules are imported and wrap the entrypoint in capture().

3

Run one session

Open Traces. Each captured node, model call, and tool call appears in the execution tree, grouped by session id.

Send your first trace in minutes. Scripts and CLIs exit before the exporter flushes, so calllatitude.flush() before exit; servers do not need it. LangGraph runs onlangchain-core, so setup is documented in the LangChain integration guide and the same steps cover both. LangChain integration guide →

Debug LangGraph failures in production

The failure modes that come with tool-calling graphs, and what finds each one.

Tool-call failures

A tool errors or returns the wrong shape, and the graph carries on with bad state. The Tool Call Errors flagger annotates every one across the project.

Tool-call spans →

Cycles and tool thrashing

Conditional edges loop through the same nodes without progress, burning tokens until the recursion limit. The Thrashing flagger detects the pattern.

Flaggers →

Output that breaks the next node

Output that does not match the declared schema, or an empty response, breaks the node after it. Caught by the Output Schema Validation and Empty Response flaggers.

Flaggers →

Regressions after a graph change

Tag traces by release and compare failure rates across a graph change. A resolved signal that starts recurring reopens as Regressed.

Signal lifecycle →

Find recurring failures hidden across LangGraph sessions

Reading traces one at a time finds the failure you went looking for. Latitude surfaces the one costing you the most sessions.

Search

Describe it in plain language

Find sessions by meaning, exact text, or metadata. The query above finds traces that never use those words.

Search →

Behaviors

Grouped by what users tried to do

Whole sessions clustered by intent and outcome, so patterns surface without you writing the query.

Behaviors →

Signals

One named, tracked problem

Repeated failures become one Signal with a trend, affected sessions, and a lifecycle. Flaggers feed it automatically.

Signals →

From production failure to verified fix

Turn a recurring production failure into a regression test, an opened PR, and a verified fix.

DetectLatitude groups recurring production failures into a Signal.
TestTurn affected traces into a regression eval.
FixAgent Dispatch sends the failure and context to Claude Code or Cursor, which opens a PR.
VerifyLatitude scores new traffic and alerts you if the failure returns.

Latitude detects and verifies. Your coding agent writes the fix. You review the PR.

Fits the stack you already have

  • Python 3.11+ & TypeScript
  • SDK or OTLP ingest
  • Any model provider
  • Cloud or self-hosted (MIT)

Replacing LangSmith, or running alongside it?

Either. Latitude patches langchain-core’s callback manager and exports OpenTelemetry spans straight to its own ingest. It never reads from LangSmith: noLANGSMITH_TRACING, no LangSmith key or account.

Already on LangSmith? Keep it and add Latitude as a second span processor. The one limitation: there is no LangSmith import, so your traces start when you instrument.

When do you need more than LangGraph logs?

Logs and tracing both answer “what happened in this run”. The gap opens once you need to know what keeps happening.

CapabilityApplication logsBasic tracing / LangSmithLatitude
Complete agent sessionsLimitedYesYes
Semantic search across sessionsNoVariesYes
Recurring failure detectionManualVariesSignals
Production traces into evalsNoVariesYes
Dispatch and verificationNoNoYes

MIT

Open source, 4.3k stars

20K

Free credits a month, 30-day retention

Unlimited

Seats on every plan, no per-user pricing

GDPR

Compliant, data in AWS eu-central-1

LangGraph observability FAQ

How do I add observability to a LangGraph agent?

Install latitude-telemetry (Python) or @latitude-data/telemetry (TypeScript), initialize Latitude with your API key and project slug before your graph modules are imported, pass the LangChain instrumentation, and wrap your graph entrypoint in capture(). Your graph code itself does not change.

Can I use Latitude with LangGraph without LangSmith?

Yes. Latitude instruments langchain-core directly. It patches the LangChain callback manager that LangGraph runs every node through, then exports OpenTelemetry spans to Latitude. It does not read from LangSmith, does not need LANGSMITH_TRACING set, and does not need a LangSmith account. The two can also run side by side. The one thing Latitude cannot do is import your existing LangSmith history.

Does Latitude support Python and TypeScript LangGraph applications?

Both. Python needs 3.11 or newer and uses instrumentations={"langchain": langchain_core}. TypeScript uses createLangChainInstrumentation from @latitude-data/telemetry/instrumentations/langchain, passed the @langchain/core/callbacks/manager module.

Can I send existing OpenTelemetry traces to Latitude?

Yes. The ingest endpoint speaks standard OTLP over HTTP at https://ingest.latitude.so/v1/traces, accepts JSON or protobuf, and returns 202 on accept. Use the Authorization and X-Latitude-Project headers, or the standard OTEL_EXPORTER_OTLP_TRACES_ENDPOINT and OTEL_EXPORTER_OTLP_TRACES_HEADERS variables. For model, token, and message detail to render, spans need OpenTelemetry GenAI (gen_ai.*) attributes, which any GenAI auto-instrumentation already sets.

Does Latitude sample LangGraph traces?

No. Latitude captures 100% of ingested traces, all searchable within your retention window. Sampling applies only to LLM-based evaluations: one generated from a signal starts at a 10% sample, which you can raise to full coverage. Note the SDKs export only LLM-relevant spans by default; sending OTLP directly ingests every span you send.

Trace your first LangGraph session

Connect your LangGraph application, send one production-like session, and inspect the complete execution in Latitude.

No credit card required.