Skip to content

Narrow example JMX exporter rules for socket, raft-channel and RequestMetrics - #13139

Open
guancioul wants to merge 1 commit into
strimzi:mainfrom
guancioul:feature/10188-narrow-example-metrics-config
Open

Narrow example JMX exporter rules for socket, raft-channel and RequestMetrics#13139
guancioul wants to merge 1 commit into
strimzi:mainfrom
guancioul:feature/10188-narrow-example-metrics-config

Conversation

@guancioul

Copy link
Copy Markdown
Contributor

Type of change

  • Enhancement / new feature

Description

Following the metrics survey and discussion in #10188, this narrows the example JMX Prometheus Exporter rules (packaging/examples/metrics/kafka-metrics.yaml) to only export the metrics actually used by the shipped Grafana dashboards and Prometheus alert rules:

  • socket-server-metrics: keep only connection-count, drop the rest.
  • raft-channel-metrics: keep only incoming-byte-total, outgoing-byte-total, request-total, response-total.
  • Exclude RequestMetrics entirely from the generic catch-all rules (contributed ~22 unused metric types).

The Strimzi Metrics Reporter example (packaging/examples/metrics/strimzi-metrics-reporter/kafka-metrics.yaml) is intentionally left untouched, its allowList mechanism is allow-only (no deny), so matching this exclusion needs a different approach and will be addressed separately.

AI assistance disclosure: Claude Code was used to help draft the narrowed regex rules and to run local verification (spinning up real Kafka brokers via Docker with the old/new JMX exporter config and diffing the scraped metrics). I reviewed all changes, understand them, and can answer questions about them.

Checklist

  • Reference relevant issue(s) and close them after merging
  • Try your changes inside a Kubernetes cluster, not just from unit tests
  • AI assistance was used to create this PR (see the Strimzi AI policy)

…tMetrics

Signed-off-by: guancioul <guancioul@gmail.com>
@snyk-io

snyk-io Bot commented Sep 9, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@codecov

codecov Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.89%. Comparing base (0b52fda) to head (4704a89).
⚠️ Report is 43 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #13139      +/-   ##
============================================
+ Coverage     80.58%   80.89%   +0.31%     
- Complexity     6581     6738     +157     
============================================
  Files           344      355      +11     
  Lines         22777    23072     +295     
  Branches       3111     3148      +37     
============================================
+ Hits          18355    18665     +310     
+ Misses         3204     3180      -24     
- Partials       1218     1227       +9     

see 47 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@scholzj scholzj added this to the 1.3.0 milestone Sep 9, 2026

@scholzj scholzj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks for the PR.

@scholzj
scholzj requested a review from a team September 9, 2026 23:09
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.

Optimize example configurations of exported metrics against our dashboards and alerts

3 participants