Guide
Pick the way to instrument that fits your agent, then wire it up in a few lines.
Trodo captures a run (one agent execution) as a tree of spans (each LLM call, tool call, and step inside it). There are several ways to capture that tree. Pick the one that matches your setup.
Choose your path
| If you… | Use |
|---|---|
| have a normal agent in one process | Wrap your agent |
| have custom steps that aren't auto-captured | Add manual spans |
| have a run that spans many requests or workers | Long-running & background runs |
| call other services mid-run | Distributed tracing |
| already run OpenTelemetry | Use your existing OpenTelemetry |
| can't wrap your LLM client as a function | Raw HTTP / non-OTel clients |
| use OpenAI, LangChain, LlamaIndex, … | Frameworks |
| build an MCP server (you're the server, not the client) | MCP server |
Most teams start with Wrap your agent and add the others as the need comes up.
Not sure which fits? The rows are roughly ordered from most common to most specialized: read top-down and pick the first that matches your stack. They also compose: e.g. Wrap your agent + a Framework instrumentor is the typical starting point, and you add Distributed tracing or Long-running runs only if your run actually crosses a boundary.
One-time setup
Wherever you instrument from, initialise the SDK once at process start. Auto-instrumentation is on by default, so calls from installed frameworks are captured with no extra code.
npm install trodo-node@^2.23.5import trodo from 'trodo-node';
trodo.init({ siteId: process.env.TRODO_SITE_ID });pip install trodo-pythonimport os, trodo
trodo.init(site_id=os.environ['TRODO_SITE_ID'])Your site ID is under Settings → Project → General in the Trodo app.
What you attach to a run
Capturing the tree is half the picture. Once spans land you can enrich them. Each of these has its own guide: