feat(inkless:switch): expose DisklessWithoutRemoteStorageCount metric for legacy topics#618
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a controller metric to surface diskless topics that do not have remote.storage.enable=true, with snapshot-time warning logs listing affected topics.
Changes:
- Registers
DisklessWithoutRemoteStorageCountas a KafkaController gauge. - Computes the new count during snapshot publication and logs affected diskless topics.
- Adds metric-name and gauge wiring tests.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
metadata/src/main/java/org/apache/kafka/controller/metrics/ControllerMetadataMetrics.java |
Adds storage and registration for the new gauge metric. |
metadata/src/main/java/org/apache/kafka/controller/metrics/ControllerMetadataMetricsPublisher.java |
Counts diskless topics without remote storage during snapshot publication and logs warnings. |
metadata/src/test/java/org/apache/kafka/controller/metrics/ControllerMetadataMetricsTest.java |
Verifies metric registration and gauge value wiring. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
a3081ba to
55d22c3
Compare
1d7a72e to
eace6c7
Compare
eace6c7 to
60a5234
Compare
… for legacy topics Adds a gauge metric counting diskless topics where remote.storage.enable is explicitly set to false. Topics with remote.storage.enable absent (never configured) are not counted — the controller will auto-enable on next interaction. Logs a warning with topic names on snapshot load (capped at 20), letting operators fix at their pace. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
60a5234 to
1b3cc19
Compare
Comment on lines
+79
to
+80
| private static final MetricName DISKLESS_WITHOUT_REMOTE_STORAGE_COUNT = getMetricName( | ||
| "KafkaController", "DisklessWithoutRemoteStorageCount"); |
… metric for legacy topics
giuseppelillo
approved these changes
May 28, 2026
giuseppelillo
pushed a commit
that referenced
this pull request
May 29, 2026
… for legacy topics (#618) * feat(inkless:switch): expose DisklessWithoutRemoteStorageCount metric for legacy topics Adds a gauge metric counting diskless topics where remote.storage.enable is explicitly set to false. Topics with remote.storage.enable absent (never configured) are not counted — the controller will auto-enable on next interaction. Logs a warning with topic names on snapshot load (capped at 20), letting operators fix at their pace. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fixup! feat(inkless:switch): expose DisklessWithoutRemoteStorageCount metric for legacy topics --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
giuseppelillo
pushed a commit
that referenced
this pull request
May 29, 2026
… for legacy topics (#618) * feat(inkless:switch): expose DisklessWithoutRemoteStorageCount metric for legacy topics Adds a gauge metric counting diskless topics where remote.storage.enable is explicitly set to false. Topics with remote.storage.enable absent (never configured) are not counted — the controller will auto-enable on next interaction. Logs a warning with topic names on snapshot load (capped at 20), letting operators fix at their pace. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fixup! feat(inkless:switch): expose DisklessWithoutRemoteStorageCount metric for legacy topics --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a gauge metric counting diskless topics that have
remote.storage.enableexplicitly set tofalse. Topics where RS is absent (never configured) are not counted — the controller will auto-enable RS on next interaction.Logs a warning with topic names on snapshot load, letting operators fix at their pace.
Changes
ControllerMetadataMetrics: newDisklessWithoutRemoteStorageCountgaugeControllerMetadataMetricsPublisher: counts topics inpublishSnapshot()where RS is explicitlyfalse; advisory-only, refreshed on snapshot (default: every hour or 20MB of metadata)🤖 Generated with Claude Code