aboutsummaryrefslogtreecommitdiffstats
path: root/orchestrator
diff options
context:
space:
mode:
authorHåkon Hallingstad <hakon@verizonmedia.com>2019-10-24 11:25:57 +0200
committerHåkon Hallingstad <hakon@verizonmedia.com>2019-10-24 11:25:57 +0200
commit676265479b17f2d266737fee23969419b8eb45ad (patch)
tree0fff4e4616c81591877c89f03d2c32531c52fba0 /orchestrator
parent51d8e8546649327cef3b892090c1631a603a4949 (diff)
Add count metrics of orchestrator application lock to get rates
Diffstat (limited to 'orchestrator')
-rw-r--r--orchestrator/src/main/java/com/yahoo/vespa/orchestrator/status/ZookeeperStatusService.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/status/ZookeeperStatusService.java b/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/status/ZookeeperStatusService.java
index 65bdaed86b8..2d6a9299fcc 100644
--- a/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/status/ZookeeperStatusService.java
+++ b/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/status/ZookeeperStatusService.java
@@ -140,6 +140,10 @@ public class ZookeeperStatusService implements StatusService {
double seconds = durationInSeconds(startTime, acquireEndTime);
metric.set("orchestrator.lock.acquire-latency", seconds, metricContext);
metric.set("orchestrator.lock.acquired", lockAcquired ? 1 : 0, metricContext);
+
+ metric.add("orchestrator.lock.acquire", 1, metricContext);
+ String acquireResultMetricName = lockAcquired ? "orchestrator.lock.acquire-success" : "orchestrator.lock.acquire-timedout";
+ metric.add(acquireResultMetricName, 1, metricContext);
}
Runnable updateLockHoldMetric = () -> {