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 processWrap your agent
have custom steps that aren't auto-capturedAdd manual spans
have a run that spans many requests or workersLong-running & background runs
call other services mid-runDistributed tracing
already run OpenTelemetryUse your existing OpenTelemetry
can't wrap your LLM client as a functionRaw 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.5
import trodo from 'trodo-node';

trodo.init({ siteId: process.env.TRODO_SITE_ID });
pip install trodo-python
import 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:

  • Conversations: group runs into multi-turn sessions
  • Users: the person behind each run
  • Metadata: custom attributes you can filter on
  • Trace IDs: your own IDs for distributed tracing
  • Feedback: thumbs up/down and ratings
  • Pricing: token and cost tracking, custom model prices

On this page