Skip to content

metrics: bound label values and cap cardinality - #776

Open
Alisadev-dev wants to merge 2 commits into
DigiNodes:mainfrom
Alisadev-dev:fix/metrics-label-cardinality
Open

Alisadev-dev wants to merge 2 commits into
DigiNodes:mainfrom
Alisadev-dev:fix/metrics-label-cardinality

Conversation

@Alisadev-dev

@Alisadev-dev Alisadev-dev commented Oct 19, 2026 •

Copy link
Copy Markdown

Wallet/claim/CID/URL/error values could become Prometheus labels via the domain counters and the HTTP middleware.

This routes every label through a small allowlist policy that collapses unbounded values to "other", caps distinct values per label, and adds a scrape budget assertion for CI. Unmatched HTTP requests no longer use raw
eq.path as a route label. Metric names/units and the label policy are documented.

Tests cover wallet/claim/error injection, high-cardinality load, secret canaries, histogram boundary and scrape budget.

Closes #665

@dDevAhmed

Copy link
Copy Markdown
Contributor

@Alisadev-dev make sure to reference the issue you worked on in the pull request description

Wallet/claim/CID/URL/error values could become Prometheus labels via the
domain counters and the HTTP middleware. Route every label through a small
allowlist policy that collapses unbounded values to other, cap distinct
values per label, and expose a scrape budget assertion for CI. Also stop
using the raw req.path as a route label for unmatched requests.

Document metric names/units and the label policy.
@Alisadev-dev

Copy link
Copy Markdown
Author

my bad sorry about that, it is fixed now

@Alisadev-dev
Alisadev-dev force-pushed the fix/metrics-label-cardinality branch from 839bf2a to 34a66cc Compare October 19, 2026 09:37
@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Alisadev-dev

Copy link
Copy Markdown
Author

Please kindly review and merge
@dDevAhmed

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.

PREWAVE-BE-070 — Enforce Metrics Cardinality, Redaction, and Semantic Conventions

2 participants