From 2132a0719a11d2ebf987c3cf7e550f3eb81d1498 Mon Sep 17 00:00:00 2001 From: "nastassia.dailidava" Date: Fri, 18 Oct 2024 14:42:35 +0200 Subject: [PATCH] allegro-internal/flex-roadmap#819 Migrated metrics to prometheus | changed metrics names [2] --- .../tech/servicemesh/envoycontrol/utils/ReactorUtils.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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..ff04cf09a 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 @@ -168,7 +168,11 @@ private fun innerBufferExtractor(index: Int) = { s: Scannable -> } private val queueSubscriptionBufferExtractor = { s: Fuseable.QueueSubscription<*> -> - s.size.toDouble() + if (s != null) { + s.size.toDouble() + } else { + -1.0 + } } sealed class ParallelizableScheduler