From c2479f2cd87af08093a8c6a6bb5f49f116338dfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Attila=20M=C3=A9sz=C3=A1ros?= Date: Fri, 27 Mar 2026 16:29:46 +0100 Subject: [PATCH 1/4] docs: metrics docs update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Attila Mészáros --- .../en/docs/documentation/observability.md | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/docs/content/en/docs/documentation/observability.md b/docs/content/en/docs/documentation/observability.md index ac9ba9c9e8..fae06e43c7 100644 --- a/docs/content/en/docs/documentation/observability.md +++ b/docs/content/en/docs/documentation/observability.md @@ -113,20 +113,19 @@ Metrics metrics = MicrometerMetricsV2.newBuilder(registry) All meters use `controller.name` as their primary tag. Counters optionally carry a `namespace` tag when `withNamespaceAsTag()` is enabled. -| Meter name (Micrometer) | Type | Tags | Description | -|--------------------------------------|---------|---------------------------------------------------|------------------------------------------------------------------| -| `reconciliations.active` | gauge | `controller.name` | Number of reconciler executions currently executing | -| `reconciliations.queue` | gauge | `controller.name` | Number of resources currently queued for reconciliation | -| `custom_resources` | gauge | `controller.name` | Number of custom resources tracked by the controller | +| Meter name (Micrometer) | Type | Tags | Description | +|--------------------------------------|---------|---------------------------------------------------|-----------------------------------------------------------------| +| `reconciliations.active` | gauge | `controller.name` | Number of reconciler executions currently executing | +| `reconciliations.queue` | gauge | `controller.name` | Number of resources currently queued for reconciliation | +| `custom_resources` | gauge | `controller.name` | Number of custom resources tracked by the controller | | `reconciliations.execution.duration` | timer | `controller.name` | Reconciliation execution duration with explicit bucket histogram | -| `reconciliations.started.total` | counter | `controller.name`, `namespace`* | Number of reconciliations started (including retries) | -| `reconciliations.success.total` | counter | `controller.name`, `namespace`* | Number of successfully finished reconciliations | -| `reconciliations.failure.total` | counter | `controller.name`, `namespace`* | Number of failed reconciliations | -| `reconciliations.retries.total` | counter | `controller.name`, `namespace`* | Number of reconciliation retries | -| `events.received` | counter | `controller.name`, `event`, `action`, `namespace` | Number of Kubernetes events received by the controller | +| `reconciliations.started.total` | counter | `controller.name`, `namespace`* | Number of reconciliations started (including retries) | +| `reconciliations.success.total` | counter | `controller.name`, `namespace`* | Number of successfully finished reconciliations | +| `reconciliations.failure.total` | counter | `controller.name`, `namespace`* | Number of failed reconciliations | +| `reconciliations.retries.total` | counter | `controller.name`, `namespace`* | Number of reconciliation retries | +| `events.received` | counter | `controller.name`, `event`, `action`, `namespace`* | Number of events received by the controller | \* `namespace` tag is only included when `withNamespaceAsTag()` is enabled. - The execution timer uses explicit boundaries (10ms, 50ms, 100ms, 250ms, 500ms, 1s, 2s, 5s, 10s, 30s) to ensure compatibility with `histogram_quantile()` queries in Prometheus. This is important when using the OpenTelemetry Protocol (OTLP) registry, where `publishPercentileHistogram()` would otherwise produce Base2 Exponential Histograms that are incompatible with classic From 301e6303b66f0267296f43a18aa2a043faf1f56f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Attila=20M=C3=A9sz=C3=A1ros?= Date: Fri, 27 Mar 2026 16:30:41 +0100 Subject: [PATCH 2/4] wip MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Attila Mészáros --- .../operator/sample/metrics/MetricsHandlingE2E.java | 1 - 1 file changed, 1 deletion(-) diff --git a/sample-operators/metrics-processing/src/test/java/io/javaoperatorsdk/operator/sample/metrics/MetricsHandlingE2E.java b/sample-operators/metrics-processing/src/test/java/io/javaoperatorsdk/operator/sample/metrics/MetricsHandlingE2E.java index 29d05b8138..40924c572d 100644 --- a/sample-operators/metrics-processing/src/test/java/io/javaoperatorsdk/operator/sample/metrics/MetricsHandlingE2E.java +++ b/sample-operators/metrics-processing/src/test/java/io/javaoperatorsdk/operator/sample/metrics/MetricsHandlingE2E.java @@ -260,7 +260,6 @@ private void assertMetricPresent( log.info("{}: {}", query, result); assertThat(result).contains("\"status\":\"success\""); for (String expected : expectedSubstrings) { - log.info("Checking if result: {} contains expected: {}", result, expected); assertThat(result).contains(expected); } }); From 83055150bfd74134944cd89fd31e11df21661215 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Attila=20M=C3=A9sz=C3=A1ros?= Date: Fri, 27 Mar 2026 16:42:58 +0100 Subject: [PATCH 3/4] fix table format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Attila Mészáros --- .../en/docs/documentation/observability.md | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/content/en/docs/documentation/observability.md b/docs/content/en/docs/documentation/observability.md index fae06e43c7..d4b29e56b8 100644 --- a/docs/content/en/docs/documentation/observability.md +++ b/docs/content/en/docs/documentation/observability.md @@ -113,17 +113,17 @@ Metrics metrics = MicrometerMetricsV2.newBuilder(registry) All meters use `controller.name` as their primary tag. Counters optionally carry a `namespace` tag when `withNamespaceAsTag()` is enabled. -| Meter name (Micrometer) | Type | Tags | Description | -|--------------------------------------|---------|---------------------------------------------------|-----------------------------------------------------------------| -| `reconciliations.active` | gauge | `controller.name` | Number of reconciler executions currently executing | -| `reconciliations.queue` | gauge | `controller.name` | Number of resources currently queued for reconciliation | -| `custom_resources` | gauge | `controller.name` | Number of custom resources tracked by the controller | -| `reconciliations.execution.duration` | timer | `controller.name` | Reconciliation execution duration with explicit bucket histogram | -| `reconciliations.started.total` | counter | `controller.name`, `namespace`* | Number of reconciliations started (including retries) | -| `reconciliations.success.total` | counter | `controller.name`, `namespace`* | Number of successfully finished reconciliations | -| `reconciliations.failure.total` | counter | `controller.name`, `namespace`* | Number of failed reconciliations | -| `reconciliations.retries.total` | counter | `controller.name`, `namespace`* | Number of reconciliation retries | -| `events.received` | counter | `controller.name`, `event`, `action`, `namespace`* | Number of events received by the controller | +| Meter name (Micrometer) | Type | Tags | Description | +|--------------------------------------|---------|----------------------------------------------------|------------------------------------------------------------------| +| `reconciliations.active` | gauge | `controller.name` | Number of reconciler executions currently executing | +| `reconciliations.queue` | gauge | `controller.name` | Number of resources currently queued for reconciliation | +| `custom_resources` | gauge | `controller.name` | Number of custom resources tracked by the controller | +| `reconciliations.execution.duration` | timer | `controller.name` | Reconciliation execution duration with explicit bucket histogram | +| `reconciliations.started.total` | counter | `controller.name`, `namespace`* | Number of reconciliations started (including retries) | +| `reconciliations.success.total` | counter | `controller.name`, `namespace`* | Number of successfully finished reconciliations | +| `reconciliations.failure.total` | counter | `controller.name`, `namespace`* | Number of failed reconciliations | +| `reconciliations.retries.total` | counter | `controller.name`, `namespace`* | Number of reconciliation retries | +| `events.received` | counter | `controller.name`, `event`, `action`, `namespace`* | Number of events received by the controller | \* `namespace` tag is only included when `withNamespaceAsTag()` is enabled. The execution timer uses explicit boundaries (10ms, 50ms, 100ms, 250ms, 500ms, 1s, 2s, 5s, 10s, 30s) to ensure From bb1d48bfdfda21d8809c74dd78c139aab33db97c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Attila=20M=C3=A9sz=C3=A1ros?= Date: Fri, 27 Mar 2026 16:47:19 +0100 Subject: [PATCH 4/4] wip MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Attila Mészáros --- docs/content/en/docs/documentation/observability.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/content/en/docs/documentation/observability.md b/docs/content/en/docs/documentation/observability.md index d4b29e56b8..2896949db8 100644 --- a/docs/content/en/docs/documentation/observability.md +++ b/docs/content/en/docs/documentation/observability.md @@ -126,6 +126,7 @@ All meters use `controller.name` as their primary tag. Counters optionally carry | `events.received` | counter | `controller.name`, `event`, `action`, `namespace`* | Number of events received by the controller | \* `namespace` tag is only included when `withNamespaceAsTag()` is enabled. + The execution timer uses explicit boundaries (10ms, 50ms, 100ms, 250ms, 500ms, 1s, 2s, 5s, 10s, 30s) to ensure compatibility with `histogram_quantile()` queries in Prometheus. This is important when using the OpenTelemetry Protocol (OTLP) registry, where `publishPercentileHistogram()` would otherwise produce Base2 Exponential Histograms that are incompatible with classic