diff options
author | Håkon Hallingstad <hakon@verizonmedia.com> | 2019-10-24 11:25:57 +0200 |
---|---|---|
committer | Håkon Hallingstad <hakon@verizonmedia.com> | 2019-10-24 11:25:57 +0200 |
commit | 676265479b17f2d266737fee23969419b8eb45ad (patch) | |
tree | 0fff4e4616c81591877c89f03d2c32531c52fba0 /orchestrator | |
parent | 51d8e8546649327cef3b892090c1631a603a4949 (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.java | 4 |
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 = () -> { |