llumo-inference
v1.7.0
Published
Telemetry SDK for tracing HTTP and LLM spans
Readme
llumo-inference
A telemetry SDK that initializes Traceloop with a buffered exporter and captures outgoing HTTP spans immediately at module load time.
Install
npm install llumo-inferenceUsage
Initialize as early as possible in your app startup:
CommonJS
const { initTelemetry } = require("llumo-inference");
async function bootstrap() {
await initTelemetry({
token: process.env.LLUMO_API_KEY,
flushDelayMs: 6000,
playgroundName: "my-playground",
});
// start your app after telemetry is initialized
}
bootstrap();ESM / TypeScript
import { initTelemetry } from "llumo-inference";
await initTelemetry({
token: process.env.LLUMO_API_KEY,
flushDelayMs: 6000,
playgroundName: "my-playground",
});API
initTelemetry(options?)
initTelemetry initializes Traceloop and binds the HTTP instrumentation to the live tracer provider.
| Option | Type | Default | Description |
| --- | --- | --- | --- |
| baseUrl | string | http://localhost:4455/api/v1/telemetry | Telemetry ingestion endpoint |
| token | string | "" | Optional bearer token for telemetry + playground API calls |
| flushDelayMs | number | 6000 | Per-trace debounce before export |
| playgroundName | string | undefined | Optional playground name resolved via llumo API |
Notes
- HTTP/HTTPS patching is applied synchronously at module load to avoid missing early outgoing calls.
- Internal telemetry/llumo endpoints are ignored by outgoing request hook filters.
- Traces are buffered by
traceId, deduplicated byspan.id, and exported as grouped payloads.
