summaryrefslogtreecommitdiffstats
path: root/zkfacade/src/main/java/com
diff options
context:
space:
mode:
authorjonmv <venstad@gmail.com>2022-10-13 14:27:26 +0200
committerjonmv <venstad@gmail.com>2022-10-13 14:27:26 +0200
commit21d7610877dca43e4914fadbf8bd9b6474ff523e (patch)
treed57885cede50d0294c049ae5821b6152771e7183 /zkfacade/src/main/java/com
parent7969913ee302ec4a19c38c529b99ce12edddb5b7 (diff)
Update metrics as agreed
Diffstat (limited to 'zkfacade/src/main/java/com')
-rw-r--r--zkfacade/src/main/java/com/yahoo/vespa/curator/SingletonManager.java9
1 files changed, 1 insertions, 8 deletions
diff --git a/zkfacade/src/main/java/com/yahoo/vespa/curator/SingletonManager.java b/zkfacade/src/main/java/com/yahoo/vespa/curator/SingletonManager.java
index ec1aec4f370..e54197c39fd 100644
--- a/zkfacade/src/main/java/com/yahoo/vespa/curator/SingletonManager.java
+++ b/zkfacade/src/main/java/com/yahoo/vespa/curator/SingletonManager.java
@@ -154,7 +154,6 @@ class SingletonManager {
doom.set(null);
if (lock != null) try {
logger.log(INFO, "Releasing lease for " + id);
- metrics.hasLease(false);
lock.close();
lock = null;
}
@@ -282,7 +281,6 @@ class SingletonManager {
if (lock == null) try {
lock = curator.lock(path.append("lock"), tickTimeout);
logger.log(INFO, "Acquired lock for ID: " + id);
- metrics.hasLease(true);
}
catch (RuntimeException e) {
logger.log(FINE, "Failed acquiring lock for '" + path + "' within " + tickTimeout, e);
@@ -371,8 +369,7 @@ class SingletonManager {
private class MetricHelper {
- static final String PREFIX = "singleton.";
- static final String HAS_LEASE = PREFIX + "has_lease";
+ static final String PREFIX = "jdisc.singleton.";
static final String IS_ACTIVE = PREFIX + "is_active";
static final String ACTIVATION = PREFIX + "activation.count";
static final String ACTIVATION_MILLIS = PREFIX + "activation.millis";
@@ -387,10 +384,6 @@ class SingletonManager {
this.context = metric.createContext(Map.of("singletonId", id));
}
- void hasLease(boolean hasLease) {
- metric.set(HAS_LEASE, hasLease ? 1 : 0, context);
- }
-
void activation(Runnable activation) {
Instant start = clock.instant();
boolean failed = false;