LLM latency · Observability

latenzy

The latency your account gets from each modelClaude vs OpenAI vs Gemini, measured inside your own network. Model A vs model B, not lab-level rollups.
$ pip install latenzy
What it measures

Per-model, per-endpoint

Time to first token

TTFT p95 per model — the latency your users actually feel — as a Prometheus histogram (latenzy_ttft_seconds).

Total latency & throughput

End-to-end request duration and streaming output tokens/sec, so you can compare speed as well as first-response.

Rate-limit pressure

Outcome counts (ok / rate_limited / timeout / error) surface 429 pressure before your users do.

Same model, different paths

An endpoint label compares the same model over direct API vs Bedrock vs Vertex — a real routing and procurement decision.

How it works

Prober → Prometheus → Grafana

01 · Probe

Synthetic canaries

Small requests on an interval measure each configured model. ≤16 tokens — cost is negligible.

02 · Export

/metrics

A fail-closed Prometheus exporter: loopback by default, auth required on any routable bind.

03 · Chart

Grafana

Import dashboard 25642: a model-comparison view, p50/p95/p99 recording rules, and alerts.

04 · Live

Real traffic

Wrap real LLM calls to chart your own p95 under source="live" — one dashboard shows both.

No existing stack? A docker compose up bundle runs the prober, Prometheus, and Grafana pre-provisioned.