Skip to main content

Installation

tracectrl is on PyPI. The LangChain instrumentor is not yet published — install it from the source tree.
PyPI publication of tracectrl-instrumentation-langchain is pending. Until then, install from a local checkout or via pip install git+https://github.com/cloudsine/tracectrl.git#subdirectory=sdk/tracectrl-instrumentation-langchain.

Usage

Call tag_agent(agent_executor) (or, for LangGraph, on the compiled graph) so the agent identity propagates onto every span the run produces.

What Gets Captured

LangGraph Support

LangGraph agents are automatically captured — each node execution appears as a span with parent-child relationships matching the graph structure.

API

LangChainInstrumentor()

instrument
method
instrument(tracer_provider=None, skip_dep_check=False) — Registers the TraceCtrl span processor and wraps the OpenInference LangChain instrumentor.
uninstrument
method
uninstrument() — Shuts down the TraceCtrl processor and unwraps the OpenInference instrumentor.
instrumented
bool
Whether the instrumentor is currently active.