Skip to content

fix(metrics): track cardinality by label tuple#206

Open
saurabhhhcodes wants to merge 1 commit into
optiqor:mainfrom
saurabhhhcodes:fix-metrics-cardinality-tuples-117
Open

fix(metrics): track cardinality by label tuple#206
saurabhhhcodes wants to merge 1 commit into
optiqor:mainfrom
saurabhhhcodes:fix-metrics-cardinality-tuples-117

Conversation

@saurabhhhcodes

Copy link
Copy Markdown
Contributor

Summary\n- track unique label tuples per metric instead of counting every event\n- keep previously seen tuples recordable after the cardinality cap is reached\n- apply the guard after extracting the actual Prometheus label values for syscall, TCP, disk, scheduler, and FD metrics\n- update cardinality tests for repeated tuples, over-limit new tuples, and independent metric budgets\n\nFixes #117\n\n## Validation\n- go test ./internal/metrics\n- go test ./... (fails before completing due to existing unrelated build error: internal/chaos/cpu.go:95:14: undefined: unix.Nanosleep)\n- go vet ./... (same existing internal/chaos build error)

@saurabhhhcodes saurabhhhcodes requested a review from btwshivam as a code owner June 8, 2026 12:21
@github-actions github-actions Bot added level:advanced 200+ lines or 6+ files (auto-applied) testing Tests and test coverage and removed level:advanced 200+ lines or 6+ files (auto-applied) labels Jun 8, 2026
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

🚀 First PR — welcome aboard!

A few things to expect:

  1. CI: every PR runs build + race tests + lint + (eventually) the kernel matrix. If something fails, the log will tell you exactly which gate.
  2. DCO: every commit needs Signed-off-by:git commit -s adds it automatically.
  3. Conventional Commits: PR titles like feat(doctor): add new rule or fix(bpf): handle X. We squash-merge by default.
  4. Review: a maintainer will review within 72 hours. Suggestions are conversations, not orders — push back if something doesn't fit your context.

If you get stuck, reply here or jump to Discussions. We want this PR to land.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing Tests and test coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant