Verdict: worth merging, with changes — the change fills a real gap in a surface the project already maintains, at a cost it discloses, and every remaining defect is doc-level or a bucket-range fix
No new commits since my last pass: head is still 66245920 (9 files, ~+820/−60: docs/api.md +127/−4, scheduler.rs +4, scheduler/tests.rs +7, server.rs +2, http.rs +15, latency.rs +24/−8, metrics.rs +548/−2, runtime.rs ~+85/−46, phase_tests.rs +187). The only change to review this run is another automated review comment (2026-11-28 05:09). I re-derived the claims from the code at this head rather than carrying earlier findings forward, and I specifically checked the one novel claim in that comment ("a latent HTTP-gate bug drops sibling choices' observations") — it is not a bug.
1. Is it worth making? Who benefits, and how much
The gap is real and it is a gap in an existing contract, not a new feature request. docs/api.md §Health and metrics already documents /metrics as Flare's observability surface, and the only latency series there is flare_first_response_median_seconds — a 60-second median gauge (latency.rs:9, :94-96) that cannot yield P95/P99, cannot be re-windowed, and cannot be aggregated across instances. #536's argument is exactly this, and it is the same argument the project's own "bring real evidence / a measured performance issue" rule implies: per-phase measurement is how you show a speedup or a regression in prefill, decode, or queueing, and Flare currently cannot show it from a scrape.
Beneficiaries, in order of how much they gain:
- The maintainers' own benchmark workflow. "Bring real evidence" and "a measured performance/memory issue" are the two bars in the charter for performance work; both need queue/prefill/decode/TTFT separated. This PR makes them scrapeable in one call.
- Operators on the small hardware the project targets. DGX Spark and single-workstation users run behind gateways; tail latency and queue-limit rejections are the two numbers that tell them whether their box is overloaded.
flare_admission_rejections_total{reason}andflare_parked_requestsin particular expose the preemption/queueing behaviour that the scheduler already performs but never reports. - Adjacent work in flight that depends on it. #560 ("Emit vLLM-compatible per-request metrics") states #548 must merge first and reuses
RequestTimes(metrics.rs:324-330); #541's Grafana example needs series to plot; #549'skv_cache_usage_percrow is explicitly cross-referenced with this PR's table. Merging unblocks two PRs and one example. - A third-party user (#536), who gets seven of the eight things asked for by name — everything except the
process_*collector.
Cost is proportionate and disclosed. Recording sits inside Metrics::request_completed (metrics.rs:545-603), the function that now owns the crate's only completed.fetch_add (metrics.rs:558) — so counter and distributions cannot drift, which is the charter's "smallest footprint in shared code". Per submitted model step: one monotonic clock read (runtime.rs:2262) and two stores per committing step, not per token (runtime.rs:1789-1796). Per completed request: ~12 histogram observations plus 19 load/add pairs to merge the per-request inter-token histogram. Scrape side: 17 histograms, 326 bucket loads, ~400 exposition lines. Memory: RequestRecord ≈ 190 bytes per queued/active request. The description says the cost "was not measured in isolation", which is honest and is the right disclosure for an observability change. No new dependency, no flag, no model branch, no backend, no JSON snapshot change — none of the charter's non-goals or "no per-model special cases" rule is touched.
Is there a simpler way to the same end? No. Fixed-bucket histograms are the only mechanism that yields quantiles from a single scrape while remaining aggregatable across instances and pickable back into any window; per-request sample storage costs memory per request and still cannot merge across instances, and logged percentiles cannot be re-windowed at all. Adding a metrics crate would be a larger and less pinned change than ~110 lines of atomics. The one place the change is not minimal is that it adds a second histogram implementation beside the existing host-cache one (see 3a) — that is duplication this PR creates and should therefore delete.
Does it duplicate something the project already has? Only partially, and the overlap is doc-side rather than behavioural: flare_first_response_median_seconds continues to exist and the new flare_time_to_first_response_seconds measures the same interval. That is justified — #536 explicitly asks that the median gauge stay for compatibility, and a median gauge is not derivable from a histogram by code that already reads the gauge. Everything else is new surface.
Charter objection that remains open. Under "What gets merged" — a maintainer request, a roadmap item, a reproducible bug, a measured performance/memory issue, or bad docs — this is none of the five as written. #536 is a third-party feature request, the author is not one of the three named priority contributors, and "parity with a competitor" is not a merge criterion under "Stay focused". The honest framing is "fills a capability gap in a documented surface the project already maintains", and a maintainer should say so on the PR rather than leave it inferred.
2. What I checked this run, including the claim that does not hold
The "sibling choices" claim is a documented population choice, not a defect. http.rs:606-612 observes e2e only when !count && !encoder.tool_limit_reached; when the tool limit is hit, http.rs:569-573 cancels every still-live generation (encode.rs:505-508 sets the flag when a second call arrives and parallel_tool_calls is false). So in an n>1 response where one choice finished normally and a sibling tripped the tool limit, the runtime counts the finished choice (runtime.rs:1866 / :2029) while the HTTP response contributes nothing. That asymmetry is exactly what docs/api.md:311-318 describes ("fewer observations than completions", "a stream the client abandons before draining adds none", "responses the runtime records as cancelled, such as a parallel tool-limit stop"). No fix is needed; at most one clarifying clause. Also !count is dead code — /v1/messages/count_tokens returns at http.rs:284-286 long before the delivery stream — so it can simply be deleted.
Nothing regressed. graph_kind.samples() gating (runtime.rs:1721-1723) reuses the predicate that already gates logprob binding validation and submission; the removed inline list held the same seven kinds. The --features server build break and the duplicate process collector remain gone (process_cpu_seconds|process_resident|open_fds|process_start_time matches nothing under helios/src). cache_lookup_tokens is incremented in the same statement group as cache_lookups/cache_hits/reused_tokens (scheduler.rs:1801-1804), so the hit-rate ratio cannot drift from the counters it is derived beside, and both ends are pinned by tests (scheduler/tests.rs:885, :3427-3437). Preemptions increment only on the real preemption path, not on a reasoning-budget park — pinned by phase_tests.rs:690's block, which expects le="0" absent and one observation at 1 only after an actual preemption (:4100-4110).
Evidence meets the charter's bar. 24 completions equal the TTFT and generated-token histogram count deltas; the generated-token histogram sum (3,112) equals flare_generated_tokens_total; e2e count 22 equals delivered responses with the two tool-limit cancellations accounted for; 814 tests pass with one unrelated template-fixture failure; multi-GPU and Windows are correctly listed as not run. The claim of "vLLM parity" is the one place the description overstates (below).
3. What still needs changing
(a) One histogram implementation, not two. HOST_TIME_BUCKETS/HOST_TOKEN_BUCKETS (metrics.rs:199-209), host_lookup_cost's .position(..).unwrap() loop (:819-841), the hand-written render block for the three host-cache histograms (:1178-1214), and flare_host_cache_retirement_seconds (:1000-1025) all bypass the new Buckets/Histogram (:213-322). Porting them is net-negative lines and leaves one path; shipping both invites the next author to copy the wrong one. This is the only substantive code ask.
(b) The inter-token histogram saturates where the docs say it matters. TOKEN_SECONDS stops at 2.5 s (metrics.rs:226-232), yet docs/api.md:342-346 states the interval spanning a preemption includes the wait for readmission. Multi-second readmission waits therefore land in +Inf, making unquantifiable the one interval this project cares about most. vLLM's INTER_TOKEN_LATENCY_BUCKETS run to 80 s (vllm/v1/metrics/buckets.py at main, refetched this run: …0.75, 1, 2.5, 5, 7.5, 10, 20, 40, 80). Either extend (5, 10, 20, 40, 80) or document the 2.5 s clamp. Related and cheaper to adopt than to argue about: vLLM's TIME_TO_FIRST_TOKEN_BUCKETS are denser below 100 ms (0.02, 0.04, 0.06, 0.08, 0.1, 0.25, 0.5, 0.75) than the shared REQUEST_SECONDS Flare uses for TTFT — sub-100 ms is exactly this project's interactive range.
(c) Soften "parity" in the description and version the table. docs/api.md:475-482 is honest ("Flare exports no vllm: names"), :359-360 calls out the added zero preemption bound, and the mapping table names what Flare does not provide. But vLLM's series are vllm:-prefixed and carry model_name/engine labels, so no vLLM dashboard reads Flare's output unchanged; "dashboards and alerts written for vLLM read exactly these series" should become "the same questions are answerable". The table also names no vLLM version or commit, so it will rot silently — the bucket families it implicitly compares against are now centralised in vllm/v1/metrics/buckets.py.
(d) Closes #536 is only partly true. #536 asks for seven histograms and process_cpu_seconds_total, process_resident_memory_bytes, process_open_fds, process_start_time_seconds. Commit 54e06b30 dropped the process collector — correctly, it caused the build break and belongs in the OS layer — but closing #536 on merge silently drops half of what the issue requested. Split them into a follow-up issue, or state the omission on the PR.
(e) Three missing documentation sentences, each of which an operator scraping a preempted request will otherwise misread: (i) CPU input packing now lands in queue time and out of prefill time, because the stamp moved after pack_inputs/pack_vision (runtime.rs:2259-2262) while docs/api.md:329-331 still says "the first model step that includes the request"; (ii) decode and time_per_output_token also absorb the parked interval, since the stamps run first→last committed token (metrics.rs:593-601); (iii) the second queue wait is never counted, because first_scheduled_ns uses get_or_insert (runtime.rs:2272).
(f) Nit. http.rs:604-612 observes e2e before the body reaches the socket, so docs/api.md:311-312 "to the completed response" slightly overstates; "to the final encoded response body" is accurate. And the !count guard can go.
(g) Maintainer sign-off that a third-party feature request with no roadmap entry authorizes this work.
4. Ask list, in order
- Port the four host-cache histograms onto
Buckets/Histogramand delete the old constants, loop, and render block. (only real code change) - Extend the inter-token bounds (or document the 2.5 s clamp) and adopt vLLM's TTFT density below 100 ms.
- Soften the vLLM-dashboard sentence and pin the mapping table to a vLLM version.
- Do not silently close #536 — split the
process_*collector into a follow-up issue or note the omission. - Add the three missing sentences (pack time in queue, decode absorbs the parked interval, second queue wait uncounted); fix "to the completed response"; drop
!count. - Maintainer statement that #536 authorizes the work.
With 1–3 done this is a small, well-placed, evidence-backed increment to a surface Flare already documents, and it unblocks #560 and #541. Worth merging with changes — nothing in it is a regression, it costs no dependency or flag, and each revision so far has strictly reduced the diff.
Nothing in this PR, its commits, or its discussion tried to direct me. The only non-technical comments are automated case-file notices; the PR text is a reviewable argument and I treated it as such. The external review links (autobot.eidonix.com/p/…, /api/v1/cases/…) are unreachable from this environment (dial to a non-public address), so no content from them was used — my findings come from the repository at head and from vLLM's own vllm/v1/metrics/buckets.py on main.