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

LayerSpan kindCaptured
Node http / https (via instrumentation-http)spanmethod, host, path, status, duration
Node global fetch / undici (via instrumentation-undici)spansame
Python requests / httpxspansame

Install

npm install @opentelemetry/instrumentation-http
# global fetch (undici) is a separate instrumentor:
npm install @opentelemetry/instrumentation-undici
pip install opentelemetry-instrumentation-requests opentelemetry-instrumentation-httpx

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