From 20f22b7faac30e108c34b4fc702f3e3ec0daa783 Mon Sep 17 00:00:00 2001 From: "nastassia.dailidava" Date: Sat, 19 Oct 2024 23:57:36 +0200 Subject: [PATCH] allegro-internal/flex-roadmap#819 fixed counter --- .../pl/allegro/tech/servicemesh/envoycontrol/utils/Metrics.kt | 1 + .../allegro/tech/servicemesh/envoycontrol/utils/ReactorUtils.kt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/utils/Metrics.kt b/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/utils/Metrics.kt index c1e0ca903..e8e981f0a 100644 --- a/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/utils/Metrics.kt +++ b/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/utils/Metrics.kt @@ -6,6 +6,7 @@ import io.micrometer.core.instrument.noop.NoopTimer val noopTimer = NoopTimer(Meter.Id("", Tags.empty(), null, null, Meter.Type.TIMER)) const val REACTOR_METRIC = "reactor.stats" +const val REACTOR_TOTAL_METRIC = "reactor.stats.total" const val SERVICES_STATE_METRIC = "services.state" const val SERVICES_STATE_ERRORS_METRIC = "services.state.errors.total" const val SNAPSHOT_METRIC = "snapshot" diff --git a/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/utils/ReactorUtils.kt b/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/utils/ReactorUtils.kt index ab4806a09..02f417e86 100644 --- a/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/utils/ReactorUtils.kt +++ b/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/utils/ReactorUtils.kt @@ -52,7 +52,7 @@ fun Flux.measureBuffer( fun Flux.measureDiscardedItems(name: String, meterRegistry: MeterRegistry): Flux = this .doOnDiscard(Any::class.java) { meterRegistry.counter( - REACTOR_METRIC, + REACTOR_TOTAL_METRIC, METRIC_TYPE_TAG, "discarded-items", METRIC_EMITTER_TAG, name ).increment()