Install any skill in seconds. Free to start, no credit card required.
Get Started Free →jeremylongshore/langchain-observability
Wire LangSmith tracing and custom metric callbacks into a LangChain 1.0 chain or LangGraph 1.0 agent correctly — env-var spelling, subgraph propagation, per-tenant dimensions, cost and latency counters.
Passed 20 of 22 test cases with the skill, and 9 of 22 without it.
and 13 more in the full report
12 fixed8 passed either way1 still failing1 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 12 test cases the skill fixed. Same model, same prompt, with and without the skill.
We recently upgraded our LangGraph agent service, but traces stopped appearing in our monitoring dashboard without throwing any error messages. Additionally, when we try to log token usage on our multi-step agent workflows, nested subgraphs and tool executions seem to be completely missing from the reports. Can you help us diagnose why tracing silently fails after the upgrade and provide a full code pattern showing how to properly pass runtime callback configurations so that subgraphs emit complete telemetry?
| Checked | Without skill | With skill |
|---|---|---|
| Specifies LANGSMITH_TRACING=true and LANGSMITH_API_KEY as the canonical 1.0 environment variables. | Missed | Passed |
| Recommends passing callbacks in the invocation config dictionary during chain execution. | Passed | Passed |
| Warns against using with_config for subgraph callback propagation. | Missed | Passed |
The instructions your model reads when the skill loads.
Engineer sets LANGCHAIN_TRACING_V2=true and LANGCHAIN_API_KEY=... from the
0.2 docs, restarts the service, and sees zero traces in LangSmith — no errors,
no warnings. That is P26: in LangChain 1.0 the canonical env vars are
LANGSMITH_TRACING and LANGSMITH_API_KEY. The LANGCHAIN_* names are
soft-deprecated and fail silently on any chain that goes through 1.0 middleware
or create_react_agent. One-line fix:
export LANGSMITH_TRACING=true
export LANGSMITH_API_KEY=lsv2_...
export LANGSMITH_PROJECT=my-service-prod
Next failure mode: a custom BaseCallbackHandler attached via
chain.with_config(callbacks=[meter]) fires on the parent but is silent on
LangGraph subgraphs and create_react_agent tool calls — token counts
under-report by 30-70% vs the provider dashboard. That is P28: LangGraph
creates a child runtime per subgraph, and bound callbacks do not propagate.
Pass callbacks at invocation time instead:
await chain.ainvoke(inputs, config={"callbacks": [meter], "configurable": {"tenant_id": t}})
This skill walks through canonical LangSmith setup, a metric-callback template
with tenant dimensions, invocation-time propagation, RunnableConfig trace
tagging, and a decision tree for LangSmith-only vs OTEL-native (defer to
langchain-otel-observability / L33 for OTEL-heavy). Pin: langchain-core 1.0.x,
langgraph 1.0.x, langsmith current. LangSmith tracing adds <5ms per-span
overhead; metric callbacks add <1ms per fire. Pain-catalog anchors: P26, P28,
P04 (cache-token aggregation), P25 (retry double-counting).
langchain-core >= 1.0, < 2.0, langgraph >= 1.0, < 2.0test cases passed, vs 9 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.