Skip to content

Remove IP label from DNS query metrics#2028

Open
tpantelis wants to merge 1 commit intosubmariner-io:develfrom
tpantelis:rem_ip_label
Open

Remove IP label from DNS query metrics#2028
tpantelis wants to merge 1 commit intosubmariner-io:develfrom
tpantelis:rem_ip_label

Conversation

@tpantelis
Copy link
Contributor

@tpantelis tpantelis commented Feb 11, 2026

Remove the destination_service_ip label to reduce metrics cardinality. Each unique IP creates a separate time series, leading to unbounded cardinality in dynamic environments with pod scaling and restarts. Service-level aggregation should be sufficient for monitoring use cases.

Summary by CodeRabbit

  • Refactor
    • Simplified DNS query metrics by removing the destination service IP label. Metrics now track four dimensions instead of five.

Remove the destination_service_ip label to reduce metrics
cardinality. Each unique IP creates a separate time series,
leading to unbounded cardinality in dynamic environments with
pod scaling and restarts. Service-level aggregation should be
sufficient for monitoring use cases.

Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
@submariner-bot
Copy link
Contributor

🤖 Created branch: z_pr2028/tpantelis/rem_ip_label
🚀 Full E2E won't run until the "ready-to-test" label is applied. I will add it automatically once the PR has 2 approvals, or you can add it manually.

@coderabbitai
Copy link

coderabbitai bot commented Feb 11, 2026

Walkthrough

The changes remove the destination service IP label from DNS query metrics across the CoreDNS plugin. The metric now tracks four labels instead of five: source cluster, destination cluster, destination service name, and destination service namespace.

Changes

Cohort / File(s) Summary
DNS Query Metrics Simplification
coredns/plugin/metrics.go, coredns/plugin/handler.go
Removed dstSvcIP parameter from incDNSQueryCounter function signature and updated the call site in getDNSRecord. Also removed the dstSvcIPKey constant and its corresponding label from the prometheus GaugeVec definition.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Remove IP label from DNS query metrics' accurately and concisely describes the main change across both modified files (handler.go and metrics.go), which consistently remove the IP-related parameter and label.
Actionable Comments Resolved ✅ Passed No actionable comments (TODO, FIXME, XXX, HACK, NOTE) found in modified files; all code changes complete and consistent with PR objectives.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


No actionable comments were generated in the recent review. 🎉


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 and usage tips.

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