AI Observability Without Vendor Lock-In
Cost and trace data trapped inside one proprietary dashboard is its own form of waste — it can't be correlated with the rest of your stack. How to export it instead, without adding latency or a new point of failure.
Executive summary
A dedicated AI cost dashboard solves attribution and enforcement, but it also creates a second silo: a place SRE and platform teams have to remember to open, separate from the tracing and metrics tooling they already run every day. This report covers the alternative — exporting every proxied call to Langfuse, any OpenTelemetry backend, or a Prometheus scrape endpoint, asynchronously and without prompt or response content, so AI cost sits next to the rest of your telemetry instead of behind a separate login.
0ms
latency added to the AI call — export happens after it returns
100/2s
events per batch, delivered roughly every 2 seconds
10,000
event queue cap per proxy process before events are dropped
500
highest-spend series kept on the Prometheus endpoint; the rest fold into "__other__"
I. The second silo
Attributing and enforcing AI spend requires a proxy in the request path — there is no way around that. But a proxy that only ever shows its own dashboard creates a second silo next to the one it was supposed to fix: an SRE debugging a latency spike, a platform engineer correlating an incident, or a finance lead building a board report each has to remember a separate login, a separate query language, and a separate alerting surface just for AI spend. The fix isn't a better dashboard. It's treating export as a first-class feature — sending the same cost, token, and latency data your dashboard already computes to the tools your team already has open.
II. Export as design, not an afterthought
Cognocient forwards every proxied call to the observability tools a team already runs, configured once from Integrations. Two destinations are supported today, each speaking that ecosystem's native protocol rather than a generic webhook: Langfuse (Cloud, EU/US regional hosts, or self-hosted v3+) receives one generation trace per call, with model, provider, token usage, and cost written into Langfuse's own usageDetails and costDetails fields, so it shows up in Langfuse's existing cost views rather than a bolted-on custom field. OpenTelemetry destinations receive one span per call over OTLP/HTTP with JSON encoding, using the OpenTelemetry GenAI semantic conventions — which is what lets the same span land legibly in Grafana, Honeycomb, Datadog, New Relic, or SigNoz without a custom parser on the receiving end.
→ Full field mapping and connection steps for both destinations: Langfuse & OpenTelemetry Export
III. What's in the payload — and what's deliberately not
Every exported event carries the same core fields regardless of destination: model, provider, input and output tokens, cost in USD, latency, HTTP status, and whichever attribution tags the call carried — feature, department, user, session, project. What it never carries is prompt or response content, for the simplest possible reason: Cognocient does not store that text in the first place, so there is nothing to export. This is a deliberate scope boundary, not a limitation of the export pipeline — the feed is built for cost and usage analytics that sit beside a team's existing telemetry, not as a second prompt-tracing product competing with tools built for that job. A cache hit is exported too, tagged with a zero-cost flag, so a caching strategy's effect is visible in the same graphs as everything else.
IV. Pull instead of push: the Prometheus endpoint
Push-based export suits teams standardizing on Langfuse or an OTLP collector. Teams already running Prometheus and Grafana as their primary operational surface want the opposite direction: a scrape target. GET /api/metrics/prometheus returns month-to-date spend, request counts by status class, token counts by direction, summed latency, and budget utilisation as standard Prometheus counters and gauges — authenticated with a Cognocient key as a bearer token, which means a scoped, low-privilege proxy key can drive the scrape without holding any ability to manage team, billing, or provider credentials.
Two details matter for anyone wiring up alerts on top of it. First, the spend, request, token, and latency series are counters that reset at the start of each UTC month — exactly the shape Prometheus's own rate() and increase() functions are built to handle, so an alert keeps working across the month boundary without special-casing it. Second, series are capped at the 500 highest-spend provider/model/feature combinations, with everything past that folded into a single feature="__other__" series — a tenant with thousands of distinct feature tags cannot accidentally turn a routine scrape into a cardinality incident on its own monitoring stack.
→ Full metric list, scrape config, and example PromQL alerts: Prometheus Metrics
V. Never a new point of failure
None of this is worth adopting if it puts production AI calls at risk of a slower or less reliable path. It doesn't, by construction: export happens after a call has already returned to the application, into a bounded in-memory queue drained by a background worker in batches — roughly one hundred events every two seconds. A destination that goes down is retried once and then, if it stays down, simply drops further events once that queue's 10,000-event cap fills — a dead Langfuse project or a misconfigured OTLP endpoint degrades to “no export for a while,” never to unbounded memory growth or a slower request path. Each destination shows its own live health — Connected, Paused, or Failing, with a call count and last error — so a broken destination is visible without ever being load-bearing for the calls it's describing.
The same fail-open discipline governs the proxy itself: if Cognocient's own budget-check layer becomes unreachable, calls pass through to the provider unaffected rather than blocking, because the alternative — a monitoring dependency taking down production AI traffic — is a strictly worse failure mode than a temporary gap in attribution data. Observability export inherits that same guarantee: it is additive telemetry riding alongside the request, never a gate in front of it.
→ The fail-open guarantee in full, including the one deliberate exception: What Happens If the Proxy Goes Down?
VI. Cognocient's own view stays useful too
Exporting everywhere else doesn't make Cognocient's own dashboard redundant — the Live Call Monitor remains the fastest path to answer a specific, narrow question: did this one feature's attribution header land correctly after a deploy, which exact call caused a cost spike in a 20-minute window, or is a new routing rule actually sending the traffic it claims to. Export and the native dashboard answer different questions at different altitudes — one for correlating AI spend against the rest of an incident, the other for verifying one specific call — and neither replaces the other.
VII. Putting it together
A cost dashboard that only lives in one vendor's UI is a silo, regardless of how good that UI is. Langfuse export, OpenTelemetry export, and a Prometheus scrape endpoint are three answers to the same underlying requirement — AI spend should be queryable, alertable, and correlatable with the same tools already used for everything else a team runs — delivered asynchronously, without prompt or response content, and without ever becoming something a production AI call depends on to succeed.
Put AI spend next to the rest of your telemetry
Free forever on one provider. No credit card, ever. Langfuse, OpenTelemetry, and Prometheus export are available from the Growth plan.
Start for free →Sources & further reading