Commit Graph
2 Commits
Author SHA1 Message Date
lukaszraczylo 50d97a3221 fix(metrics): fold provenance into account batch, pin no-store output
Provenance counters now ride the accountWith batch. They no longer use a separate droppable async write, so a request costs the same number of store round trips as before.

A golden file pins the full no-store scrape body. It was captured at the base commit, so any change to the no-store output fails the test.

A partial store failure test shows that a failed family read latches the store and skips later reads in the same scrape. The README notes the rollout-day stream label and the removal of rejection series.
2026-11-26 02:45:51 +00:00
lukaszraczylo 6d55972b60 fix(metrics): render fleet-wide families from the shared store
The /metrics route runs in its own instance. That instance handles no chat traffic, so its in-memory families stayed empty.

With a limiter store, /metrics now reads the router, decision, latency, prompt-cache, provenance and rejection families from shared counters. Their HELP text uses the store-backed aggregation note. Without a store, or without the stats flag a family needs, the in-memory rendering is unchanged.

The latency counters gain day-window sums in milliseconds and streaming-only bucket counters. The histograms can then emit a real _sum and keep the stream label. Provenance writes use countAsync. The rejection month counter rides the existing rejection batch. A store read failure skips the affected families.
2026-11-26 02:34:38 +00:00