feat(metrics): publish the served model in a gllm_server_info series #52
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/server-info-metric"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Scrapes previously carried no record of which model produced them. This adds the info-style identity series, following the
prometheus_build_infoconvention:rate(gllm_generated_tokens_total[5m]) * on(instance) group_left(model) gllm_server_info.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. 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>Automated review by pr-reviewer v0.37.0 | Safety Check | Claude Sonnet 5 | tracking id
r-617b87-697bf4This is an AI-generated review and may contain mistakes.
Status: ✅ Completed
✅ 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_infopopulated 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.