From 12143faa9eb833bdd475924a933ebfd764d5258d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=BDubom=C3=ADr=20Varga?= Date: Wed, 1 Mar 2017 10:16:39 +0100 Subject: [PATCH] Added exporting of rollingMaxConcurrentExecutionCount value. See https://github.com/Netflix/Hystrix/pull/667 for more info. --- .../HystrixCodaHaleMetricsPublisherCommand.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hystrix-contrib/hystrix-codahale-metrics-publisher/src/main/java/com/netflix/hystrix/contrib/codahalemetricspublisher/HystrixCodaHaleMetricsPublisherCommand.java b/hystrix-contrib/hystrix-codahale-metrics-publisher/src/main/java/com/netflix/hystrix/contrib/codahalemetricspublisher/HystrixCodaHaleMetricsPublisherCommand.java index 214d7dc85..09f4f0e2a 100644 --- a/hystrix-contrib/hystrix-codahale-metrics-publisher/src/main/java/com/netflix/hystrix/contrib/codahalemetricspublisher/HystrixCodaHaleMetricsPublisherCommand.java +++ b/hystrix-contrib/hystrix-codahale-metrics-publisher/src/main/java/com/netflix/hystrix/contrib/codahalemetricspublisher/HystrixCodaHaleMetricsPublisherCommand.java @@ -272,6 +272,13 @@ public HystrixRollingNumberEvent call() { return HystrixRollingNumberEvent.TIMEOUT; } }); + // the rolling number of MaxConcurrentExecutionCount. Can be used to determine saturation + safelyCreateRollingCountForEvent("rollingMaxConcurentExecutionCount", new Func0() { + @Override + public HystrixRollingNumberEvent call() { + return HystrixRollingNumberEvent.COMMAND_MAX_ACTIVE; + } + }); // the number of executionSemaphorePermits in use right now metricRegistry.register(createMetricName("executionSemaphorePermitsInUse"), new Gauge() {