summaryrefslogtreecommitdiffstats
path: root/container-search/src/main/java/com/yahoo/search/searchers
diff options
context:
space:
mode:
authorgjoranv <gv@yahooinc.com>2023-06-21 17:43:15 +0200
committergjoranv <gv@yahooinc.com>2023-06-22 10:22:34 +0200
commit39d1271add1a2eee1af0c4338f8ad436c4308b57 (patch)
tree77954907289e8af7d56a89fa4525fd93d8369115 /container-search/src/main/java/com/yahoo/search/searchers
parent5bb9f07c8eef46dc6396bab553b7b74db0ea5f0f (diff)
Replace metrics strings with the corresponding enum constants.
- Add 'metrics' as provided dep for clustercontroller-core
Diffstat (limited to 'container-search/src/main/java/com/yahoo/search/searchers')
-rw-r--r--container-search/src/main/java/com/yahoo/search/searchers/ContainerLatencySearcher.java3
-rwxr-xr-xcontainer-search/src/main/java/com/yahoo/search/searchers/RateLimitingSearcher.java3
2 files changed, 4 insertions, 2 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/searchers/ContainerLatencySearcher.java b/container-search/src/main/java/com/yahoo/search/searchers/ContainerLatencySearcher.java
index 742f4b0f889..f510d68d32e 100644
--- a/container-search/src/main/java/com/yahoo/search/searchers/ContainerLatencySearcher.java
+++ b/container-search/src/main/java/com/yahoo/search/searchers/ContainerLatencySearcher.java
@@ -1,6 +1,7 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.search.searchers;
+import ai.vespa.metrics.ContainerMetrics;
import com.yahoo.component.chain.dependencies.After;
import com.yahoo.metrics.simple.Gauge;
import com.yahoo.metrics.simple.Point;
@@ -21,7 +22,7 @@ public class ContainerLatencySearcher extends Searcher {
private final Gauge latencyGauge;
public ContainerLatencySearcher(MetricReceiver metrics) {
- latencyGauge = metrics.declareGauge("query_container_latency");
+ latencyGauge = metrics.declareGauge(ContainerMetrics.QUERY_CONTAINER_LATENCY.baseName());
}
@Override
diff --git a/container-search/src/main/java/com/yahoo/search/searchers/RateLimitingSearcher.java b/container-search/src/main/java/com/yahoo/search/searchers/RateLimitingSearcher.java
index 35a3c86f763..846b8881cef 100755
--- a/container-search/src/main/java/com/yahoo/search/searchers/RateLimitingSearcher.java
+++ b/container-search/src/main/java/com/yahoo/search/searchers/RateLimitingSearcher.java
@@ -1,6 +1,7 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.search.searchers;
+import ai.vespa.metrics.ContainerMetrics;
import com.yahoo.component.annotation.Inject;
import com.yahoo.cloud.config.ClusterInfoConfig;
@@ -60,7 +61,7 @@ public class RateLimitingSearcher extends Searcher {
public static final CompoundName idDimensionKey = CompoundName.from("rate.idDimension");
public static final CompoundName dryRunKey = CompoundName.from("rate.dryRun");
- private static final String requestsOverQuotaMetricName = "requestsOverQuota";
+ private static final String requestsOverQuotaMetricName = ContainerMetrics.REQUESTS_OVER_QUOTA.baseName();
/** Used to divide quota by nodes. Assumption: All nodes get the same share of traffic. */
private final int nodeCount;