Tracing LangChain code, and wrapping raw SDK calls
Every agent you have is judged by vibes: "vault-tidy seems fine", "chronicler's classification looks right". This module turns that into a number. You trace the module 1 classifier and module 2 agent, build a dataset from real outputs, run an eval, and score vault-tidy's frontmatter fixes on a real sample. Quality stops being a feeling.
Tracing is free instrumentation. Set two env vars and every LangChain / LangGraph call in the process reports to LangSmith: inputs, outputs, latency, token counts, the full call tree.
No code change for anything built on LangChain. You get run trees in the LangSmith UI immediately.
To trace non-LangChain code, wrap it with traceable.
Code that calls the Anthropic SDK directly, like Ark's SdkSession, is not LangChain, so tracing does not see it automatically. Wrap the client.
Try it yourself
Why SdkSession isn't automatically traced
The env var is not broken here. The question is which call path it can reach.
Why does LANGSMITH_TRACING=true instrument LangChain calls automatically but not Ark's SdkSession, and what closes the gap?