Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Wires LangSmith tracing and per-tenant metric callbacks into LangChain 1.0 chains and LangGraph 1.0 agents.
Use this skill ↓41% 91%+50 ptsof test cases passed
Passed 20 of 22 test cases with the skill, and 9 of 22 without it.
An engineer in our team set both LANGCHAIN_TRACING_V2=true and LANGSMITH_TRACING=true in our .env file to be safe during a major framework upgrade. Is this practice recommended, and what issue can it cause in LangChain 1.0?
Explains that setting both variables causes stale project routing.
3 of 3 safety checks passed
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.0Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.