Ship telemetry fast with LLM cost tracking and OpenAI cost monitoring. Request-level budget alerts are available on Pro+ plans.
After sign-in, rotate a new key in Settings. Keys are shown only once.
Post LLM request metadata to the ingest endpoint after each model call. Include externalRequestId on every request for idempotency. Treat it like a unique, per-request key you generate on your side.
Use the Dashboard to monitor spend, latency and budget alerts in real time. Ingest responses include budgetWarning and budgetExceeded plus plan metadata for client-side UX.
Move from hello-world telemetry to production-grade instrumentation with clear guardrails.
Generate one ID per LLM call and reuse it on retries. Store it in request context (middleware/local variable) so the same ID flows through every retry.
const ctx = { externalRequestId: existingId ?? null };
const externalRequestId = ctx.externalRequestId ?? crypto.randomUUID();
ctx.externalRequestId = externalRequestId;
for (let attempt = 0; attempt < 3; attempt++) {
try {
return await llmCall();
} catch (err) {
if (attempt === 2) throw err;
}
}
// telemetry uses the same externalRequestId from ctx| Do | Don't |
|---|---|
| Generate once per LLM call, reuse on retry. | Create a new ID on every retry. |
| Pass the same ID through all telemetry fields. | Use timestamps alone as the ID. |
| Store it in request context for downstream access. | Recompute the ID in each layer. |
Tag = product feature, not endpoint path. Example tags: checkout.ai_summary, support.reply, invoice.extract.
Treat prompt versions like deploy labels: summarizer_v3, chat-v5.2. Rule: new deploy = new version.
userId is optional. If omitted, requests group into unknown. Never send PII; hash identifiers if you need stable user grouping.
Capture a timestamp before the LLM call and compute latency after it finishes.
const start = Date.now();
const latencyMs = Date.now() - start;usage fields.429, show/log: Telemetry throttled, retry after Xs.402 = telemetry pause. LLM calls continue. Do not retry telemetry immediately. Pause ingestion for X minutes (for example 10-15), show a UI banner, and surface an upgrade CTA.
For high throughput, queue and batch telemetry. Opsmeter ingestion can be async and should not sit on the request path.
We are shipping official SDKs and middleware for the most popular stacks.
Opsmeter .NET SDK with automatic telemetry capture.
Coming soonNode.js SDK + Express/Nest middleware for request tracing.
Coming soonFastAPI middleware and typed client for ingestion.
Coming soon