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 function 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 / global fetch | function | method, host, path, status, duration |
Python requests / httpx | function | same |
Install
npm install @opentelemetry/instrumentation-httppip 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