aboutsummaryrefslogtreecommitdiffstats
path: root/container-core
diff options
context:
space:
mode:
authorHarald Musum <musum@yahooinc.com>2023-06-22 07:59:02 +0200
committerGitHub <noreply@github.com>2023-06-22 07:59:02 +0200
commit8773f8f9934e2d99182ac717774f4fe2fa4d5c9e (patch)
treef7f184df1e09bbad350f026bb3e2e8905b269662 /container-core
parentcd9332c9d57eb9e0dab825ec939785e1951b933a (diff)
Revert "Replace metrics strings with the corresponding enum constants."
Diffstat (limited to 'container-core')
-rw-r--r--container-core/src/main/java/com/yahoo/container/jdisc/state/StateHandler.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/container-core/src/main/java/com/yahoo/container/jdisc/state/StateHandler.java b/container-core/src/main/java/com/yahoo/container/jdisc/state/StateHandler.java
index af98e380f2a..e1ec22bd622 100644
--- a/container-core/src/main/java/com/yahoo/container/jdisc/state/StateHandler.java
+++ b/container-core/src/main/java/com/yahoo/container/jdisc/state/StateHandler.java
@@ -1,7 +1,6 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.container.jdisc.state;
-import ai.vespa.metrics.ContainerMetrics;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
@@ -290,7 +289,7 @@ public class StateHandler extends AbstractRequestHandler implements CapabilityRe
Tuple latencySeconds = new Tuple(NULL_DIMENSIONS, "latencySeconds", null);
for (Map.Entry<MetricDimensions, MetricSet> entry : snapshot) {
MetricSet metricSet = entry.getValue();
- MetricValue val = metricSet.get(ContainerMetrics.SERVER_TOTAL_SUCCESFUL_RESPONSE_LATENCY.baseName());
+ MetricValue val = metricSet.get("serverTotalSuccessfulResponseLatency");
if (val instanceof GaugeMetric gauge) {
latencySeconds.add(GaugeMetric.newInstance(gauge.getLast() / 1000,
gauge.getMax() / 1000,
@@ -298,7 +297,7 @@ public class StateHandler extends AbstractRequestHandler implements CapabilityRe
gauge.getSum() / 1000,
gauge.getCount()));
}
- requestsPerSecond.add(metricSet.get(ContainerMetrics.SERVER_NUM_SUCCESSFUL_RESPONSES.baseName()));
+ requestsPerSecond.add(metricSet.get("serverNumSuccessfulResponses"));
}
List<Tuple> lst = new ArrayList<>();
if (requestsPerSecond.val != null) {