Overview
Auto-instrumentation captures supported frameworks with no extra code. Install the instrumentor and wrap your agent.
Trodo auto-instruments popular LLM frameworks. Install the instrumentor for your stack, wrap your agent, and every call inside the wrap becomes a span with its model, tokens, prompt, and completion. No per-call code.
How it works
trodo.init() turns on auto-instrumentation by default. It registers every OpenTelemetry instrumentor you have installed, so the only per-framework setup is installing its package alongside the SDK you already use.
Node ESM caveat. Instrumentation of the raw provider SDKs uses module
hooking that needs a loader preload under pure ESM (import trodo from 'trodo-node').
Start your app with the shipped bootstrap:
node --import trodo-node/register your-app.jsThis makes the raw openai SDK auto-capture under ESM. The raw Anthropic
and Google SDKs still aren't captured under ESM even with it (their
instrumentors don't hook ESM imports yet) — run those under CommonJS or wrap
with trodo.llm(...).
LangChain and the Vercel AI SDK capture under ESM either way. Python is
unaffected.
Supported frameworks
| Framework | Node package | Python package |
|---|---|---|
| OpenAI | @opentelemetry/instrumentation-openai | opentelemetry-instrumentation-openai |
| Anthropic | @traceloop/instrumentation-anthropic | opentelemetry-instrumentation-anthropic |
| LangChain | @traceloop/instrumentation-langchain | opentelemetry-instrumentation-langchain |
| LlamaIndex | @traceloop/instrumentation-llamaindex | opentelemetry-instrumentation-llamaindex |
@traceloop/instrumentation-google-generativeai | opentelemetry-instrumentation-google-generativeai | |
| Bedrock | @traceloop/instrumentation-bedrock | opentelemetry-instrumentation-bedrock |
| Cohere | @traceloop/instrumentation-cohere | opentelemetry-instrumentation-cohere |
| Mistral | use the llm helper | opentelemetry-instrumentation-mistralai |
| Vercel AI SDK | built into ai | n/a |
| Generic HTTP | @opentelemetry/instrumentation-http | opentelemetry-instrumentation-requests |
Most Node LLM instrumentors are published under the @traceloop/instrumentation-* scope (only OpenAI and HTTP live under @opentelemetry/*); trodo-node resolves either name at runtime, but npm install needs the real one.
Don't see your framework? Use manual spans or raw HTTP.
Tokens and cost
Tokens come from each provider's response; cost is computed server-side from (provider, model). See Pricing to add custom model prices.