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

LayerSpan kindCaptured
Node http / https / global fetchfunctionmethod, host, path, status, duration
Python requests / httpxfunctionsame

Install

npm install @opentelemetry/instrumentation-http
pip install opentelemetry-instrumentation-requests opentelemetry-instrumentation-httpx

HTTP 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

On this page