Generic HTTP
Outbound HTTP calls auto-capture as generic spans. Upgrade to trackLlmCall when tokens matter.
Install the HTTP instrumentor and every outbound request inside wrap your agent becomes a generic span with method, URL, status, and duration. Use this for tools that hit external APIs, or as a fallback for an LLM endpoint Trodo doesn't auto-instrument.
What's captured
| Layer | Span kind | Captured |
|---|---|---|
Node http / https (via instrumentation-http) | span | method, host, path, status, duration |
Node global fetch / undici (via instrumentation-undici) | span | same |
Python requests / httpx | span | same |
Install
npm install @opentelemetry/instrumentation-http
# global fetch (undici) is a separate instrumentor:
npm install @opentelemetry/instrumentation-undicipip install opentelemetry-instrumentation-requests opentelemetry-instrumentation-httpxHTTP instrumentation captures every outbound call, not just LLM traffic, so the waterfall gets noisy. Most teams disable it and rely on framework instrumentors (which already wrap the LLM HTTP layer):
trodo.init({ siteId: process.env.TRODO_SITE_ID, disableInstrumentations: ['http', 'fetch'] });Tokens from a raw endpoint
Auto HTTP spans record URL and status but no tokens. For a self-hosted model (Ollama, vLLM), record the call with trackLlmCall to capture model, tokens, and cost.
Next
- Raw HTTP / non-OTel clients for
trackLlmCall - Distributed tracing for propagating runs across services