Skip to content

feat: improve Prometheus metrics API#371

Open
andreas-karlsson wants to merge 2 commits intomainfrom
fix-prometheus-snapshots
Open

feat: improve Prometheus metrics API#371
andreas-karlsson wants to merge 2 commits intomainfrom
fix-prometheus-snapshots

Conversation

@andreas-karlsson
Copy link
Copy Markdown
Contributor

Summary

  • Rename instance label to resolver_id (avoids collision with Prometheus scrape target label)
  • Add # HELP lines and fix duplicate # TYPE headers from pool concatenation
  • Make histogram bucket density configurable via SnapshotConfig.BucketsPerDecade
  • Add OpenMetrics text format option via SnapshotConfig.OpenMetrics

All changes pushed into Rust/WASM — hosts just wire config through proto.
Backward-compatible across the WASM boundary (additive proto3 fields).

Test plan

  • Rust: openmetrics-parser crate validates OpenMetrics output against spec
  • Go: prometheus/common/expfmt v0.67.5 parses output (same lib that surfaced the bug)
  • Existing tests updated for resolver_id label and # HELP presence

🤖 Generated with Claude Code

andreas-karlsson and others added 2 commits April 14, 2026 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants