fix: adding missing tags for non k8s events#3256
Merged
csviri merged 8 commits intooperator-framework:mainfrom Mar 27, 2026
Merged
fix: adding missing tags for non k8s events#3256csviri merged 8 commits intooperator-framework:mainfrom
csviri merged 8 commits intooperator-framework:mainfrom
Conversation
247f318 to
39e58cc
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts MicrometerMetricsV2 event metrics so that non-Kubernetes (non-ResourceEvent) events emit a more consistent set of tags.
Changes:
- Adds an
actiontag with an"UNKNOWN"value for non-ResourceEventevents. - Adds a namespace value for non-
ResourceEventevents (currently hardcoded as"NO_NAMESPACE").
...ort/src/main/java/io/javaoperatorsdk/operator/monitoring/micrometer/MicrometerMetricsV2.java
Show resolved
Hide resolved
...ort/src/main/java/io/javaoperatorsdk/operator/monitoring/micrometer/MicrometerMetricsV2.java
Show resolved
Hide resolved
xstefank
approved these changes
Mar 27, 2026
...ort/src/main/java/io/javaoperatorsdk/operator/monitoring/micrometer/MicrometerMetricsV2.java
Show resolved
Hide resolved
...-processing/src/test/java/io/javaoperatorsdk/operator/sample/metrics/MetricsHandlingE2E.java
Outdated
Show resolved
Hide resolved
Comment on lines
+260
to
+262
| for (String expected : expectedSubstrings) { | ||
| log.info("Checking if result: {} contains expected: {}", result, expected); | ||
| assertThat(result).contains(expected); |
There was a problem hiding this comment.
log.info("Checking if result: {} contains expected: {}", result, expected); logs the full Prometheus JSON response once per expected substring on every poll iteration. This can create extremely noisy logs and slow CI. Prefer logging only the query / expected substring (or log the full result once at debug level).
...ing/src/main/java/io/javaoperatorsdk/operator/sample/metrics/MetricsHandlingReconciler1.java
Show resolved
Hide resolved
metacosm
approved these changes
Mar 27, 2026
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.
Signed-off-by: Attila Mészáros a_meszaros@apple.com