fix(server-metrics): parse OpenMetrics exposition for the vLLM Rust frontend#13
Merged
cquil11 merged 1 commit intoJul 2, 2026
Conversation
…rontend (ai-dynamo#1060) Signed-off-by: Jeff Ma <jeffjma@umich.edu> (cherry picked from commit 8ba75f9)
Try out this PRQuick install: pip install --upgrade --force-reinstall git+https://github.com/ai-dynamo/aiperf.git@5f55d1719db64234c0d69e4dad99d46b01a27a0dRecommended with virtual environment (using uv): uv venv --python 3.12 && source .venv/bin/activate
uv pip install --upgrade --force-reinstall git+https://github.com/ai-dynamo/aiperf.git@5f55d1719db64234c0d69e4dad99d46b01a27a0dLast updated for commit: |
Author
|
@majunze2001 Please confirm this cherry-pick is faithful to original |
0d2aa05
into
SemiAnalysisAI:cquil11/aiperf-agentx-v1.0
1 of 2 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-pick of upstream ai-dynamo#1060 (commit
8ba75f9a9e06377c0569f36f6d0a966d5307135a, authored by @majunze2001 — authorship preserved on the commit) ontocquil11/aiperf-agentx-v1.0.What it does
vLLM's Rust frontend serves
/metricsasapplication/openmetrics-text. The classic Prometheus parser mistypes OpenMetrics counters (family becomes anunknownnamedfoo_total), and OpenMetrics_createdsamples share the_totallabels so the creation timestamp overwrites the real counter value in the last-value de-dup.FetchResultnow carries the responseContent-Type; the collector routesapplication/openmetrics-textbodies to the OpenMetrics parser, falling back to the classic parser if the stricter parser rejects the body (e.g. missing# EOF)._createdsamples are skipped in simple-family processing so they can't clobber_totalvalues.Adaptations for this branch (semantic merge)
The source commit's context includes code this branch doesn't have; conflicts were resolved to take only the OpenMetrics change:
create_tcp_connector__getattr__machinery (unrelated circular-import fix); this branch's eager import stays._warn_dropped_non_finite/_warn_construction_failures(warn-once infra that doesn't exist on this branch); kept_parse_families._createdskip onto this branch's simpler None/non-finite sample filter.tools/ergonomics_baseline.jsonhunk:data_collector.pyis 427 lines here (< 500 threshold), so the file-size allowlist entry would only mask a future real violation.Verification
_fetch_metrics_text()->_parse_metrics_to_records()against a local HTTP server: OpenMetrics content-type routes to the OpenMetrics parser (counter typed correctly,_createdskipped), classictext/plainparsing unchanged.🤖 Generated with Claude Code