From 703777be6bddd12f1804763921851369b4d015be Mon Sep 17 00:00:00 2001 From: "nastassia.dailidava" Date: Mon, 14 Oct 2024 18:41:23 +0200 Subject: [PATCH] allegro-internal/flex-roadmap#819 removed quantiles --- .../envoycontrol/snapshot/SnapshotUpdater.kt | 4 ---- .../consul/services/ConsulServiceChanges.kt | 10 +--------- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/SnapshotUpdater.kt b/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/SnapshotUpdater.kt index 2ca421461..cae47df5e 100644 --- a/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/SnapshotUpdater.kt +++ b/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/SnapshotUpdater.kt @@ -198,13 +198,10 @@ class SnapshotUpdater( } } - private val updateSnapshotForGroupsTimer = meterRegistry.timer("snapshot.update.duration.seconds") - private fun updateSnapshotForGroups( groups: Collection, result: UpdateResult ): Mono { - val sample = Timer.start() versions.retainGroups(cache.groups()) val results = Flux.fromIterable(groups) .doOnNextScheduledOn(groupSnapshotScheduler) { group -> @@ -222,7 +219,6 @@ class SnapshotUpdater( } } return results.then(Mono.fromCallable { - sample.stop(updateSnapshotForGroupsTimer) result }) } diff --git a/envoy-control-source-consul/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/consul/services/ConsulServiceChanges.kt b/envoy-control-source-consul/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/consul/services/ConsulServiceChanges.kt index 39b01cc79..22e23873d 100644 --- a/envoy-control-source-consul/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/consul/services/ConsulServiceChanges.kt +++ b/envoy-control-source-consul/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/consul/services/ConsulServiceChanges.kt @@ -13,16 +13,14 @@ import pl.allegro.tech.servicemesh.envoycontrol.logger import pl.allegro.tech.servicemesh.envoycontrol.server.ReadinessStateHandler import pl.allegro.tech.servicemesh.envoycontrol.services.ServiceInstances import pl.allegro.tech.servicemesh.envoycontrol.services.ServicesState -import pl.allegro.tech.servicemesh.envoycontrol.utils.ENVOY_CONTROL_WARM_UP_METRIC -import pl.allegro.tech.servicemesh.envoycontrol.utils.measureDiscardedItems import pl.allegro.tech.servicemesh.envoycontrol.utils.CHECKPOINT_TAG import pl.allegro.tech.servicemesh.envoycontrol.utils.METRIC_EMITTER_TAG import pl.allegro.tech.servicemesh.envoycontrol.utils.REACTOR_METRIC +import pl.allegro.tech.servicemesh.envoycontrol.utils.measureDiscardedItems import reactor.core.publisher.Flux import reactor.core.publisher.FluxSink import java.time.Duration import java.util.concurrent.ConcurrentHashMap -import java.util.concurrent.TimeUnit import pl.allegro.tech.discovery.consul.recipes.watch.catalog.ServiceInstances as RecipesServiceInstances import pl.allegro.tech.discovery.consul.recipes.watch.catalog.Services as RecipesServices @@ -231,13 +229,7 @@ class ConsulServiceChanges( remaining.remove(service) ready = remaining.isEmpty() if (ready) { - val stopTimer = System.currentTimeMillis() readinessStateHandler.ready() - metrics.meterRegistry.timer(ENVOY_CONTROL_WARM_UP_METRIC) - .record( - stopTimer - startTimer, - TimeUnit.SECONDS - ) } } }