feat(metrics): publish the served model in a gllm_server_info series #52

Merged
rcsheets merged 1 commit from feat/server-info-metric into main 2026-07-23 02:26:37 +00:00
Owner

Scrapes previously carried no record of which model produced them. This adds the info-style identity series, following the prometheus_build_info convention:

gllm_server_info{model="Mistral-Small-3.2",version="abc1234"} 1
  • The model and build version ride as labels on one constant series; dashboards join it onto other series at query time, e.g. rate(gllm_generated_tokens_total[5m]) * on(instance) group_left(model) gllm_server_info.
  • Deliberately not a label on every series: that would break counter continuity whenever the served model changes and bloat every query.
  • Published in newEngine right after setDefaults resolves the served model name (same id the API and status endpoint report), with the same engine.BuildVersion() the status payloads carry.
  • AGENTS.md metrics inventory updated to match.

TestServerInfo pins the shape: exactly one series, value fixed at 1, model/version as labels.

🤖 Generated with Claude Code

Scrapes previously carried no record of which model produced them. This adds the info-style identity series, following the `prometheus_build_info` convention: gllm_server_info{model="Mistral-Small-3.2",version="abc1234"} 1 - The model and build version ride as labels on one constant series; dashboards join it onto other series at query time, e.g. `rate(gllm_generated_tokens_total[5m]) * on(instance) group_left(model) gllm_server_info`. - Deliberately *not* a label on every series: that would break counter continuity whenever the served model changes and bloat every query. - Published in newEngine right after setDefaults resolves the served model name (same id the API and status endpoint report), with the same engine.BuildVersion() the status payloads carry. - AGENTS.md metrics inventory updated to match. TestServerInfo pins the shape: exactly one series, value fixed at 1, model/version as labels. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(metrics): publish the served model in a gllm_server_info series
All checks were successful
ci / test_and_build (pull_request) Successful in 24s
b940f70916
Scrapes previously carried no record of which model produced them. Add
the info-style gllm_server_info{model,version} = 1 series (the
prometheus_build_info convention): the served model name and build
version ride as labels on one constant series, joined onto the other
series at query time. Deliberately not a label on every series -- that
would break counter continuity whenever the model changes and bloat
every query.

The engine publishes it at construction, after setDefaults has resolved
the served model name, so every scrape says what was loaded.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Collaborator

Automated review by pr-reviewer v0.37.0 | Safety Check | Claude Sonnet 5 | tracking id r-617b87-697bf4
This is an AI-generated review and may contain mistakes.

Status: Completed


⚠️ The primary review (Mistral Small) failed. The review below is from Claude Sonnet 5, which reviewed the same diff.

Verdict: LGTM — Straightforward, additive metrics change with test coverage and no signs of bugs, secrets, or breaking changes.

Small, well-scoped change: adds a new Prometheus gauge vec gllm_server_info populated once at engine construction, plus a test verifying its shape. No secrets, no destructive changes, no obvious logic errors. The new metric is additive to the registry and doesn't alter existing series or behavior. Test coverage looks reasonable for the new code path.

*Automated review by [pr-reviewer](https://git.brooktrails.org/brooktrails/pr-reviewer) v0.37.0 | Safety Check | Claude Sonnet 5 | tracking id `r-617b87-697bf4`* *This is an AI-generated review and may contain mistakes.* **Status:** ✅ Completed --- > ⚠️ The primary review (**Mistral Small**) failed. The review below is from **Claude Sonnet 5**, which reviewed the same diff. **✅ Verdict: LGTM** — Straightforward, additive metrics change with test coverage and no signs of bugs, secrets, or breaking changes. Small, well-scoped change: adds a new Prometheus gauge vec `gllm_server_info` populated once at engine construction, plus a test verifying its shape. No secrets, no destructive changes, no obvious logic errors. The new metric is additive to the registry and doesn't alter existing series or behavior. Test coverage looks reasonable for the new code path.
rcsheets deleted branch feat/server-info-metric 2026-07-23 02:26:38 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
brooktrails/gllm!52
No description provided.