summaryrefslogtreecommitdiffstats
path: root/controller-server
diff options
context:
space:
mode:
authoryngveaasheim <yngve@yahooinc.com>2023-07-31 10:46:47 +0200
committeryngveaasheim <yngve@yahooinc.com>2023-07-31 10:46:47 +0200
commit161fd1d7ff0ddd19b1f46e087db32d8f86049837 (patch)
tree237fd4062f1bf4d4690d019b9998b1bb94432f06 /controller-server
parent86f9adbaa720c8993ba61010a2ec5fae06ebe30d (diff)
Add enums for infrastructure and add to vespametricsset as needed for infrastructure services.
Diffstat (limited to 'controller-server')
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/JobMetrics.java27
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/MetricsReporter.java13
2 files changed, 21 insertions, 19 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/JobMetrics.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/JobMetrics.java
index b9bff5f777e..9ffbb331d0f 100644
--- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/JobMetrics.java
+++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/JobMetrics.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.vespa.hosted.controller.deployment;
+import ai.vespa.metrics.ConfigServerMetrics;
import com.yahoo.jdisc.Metric;
import com.yahoo.vespa.hosted.controller.api.integration.deployment.JobId;
@@ -13,19 +14,19 @@ import java.util.Map;
*/
public class JobMetrics {
- public static final String start = "deployment.start";
- public static final String nodeAllocationFailure = "deployment.nodeAllocationFailure";
- public static final String endpointCertificateTimeout = "deployment.endpointCertificateTimeout";
- public static final String deploymentFailure = "deployment.deploymentFailure";
- public static final String invalidApplication = "deployment.invalidApplication";
- public static final String convergenceFailure = "deployment.convergenceFailure";
- public static final String testFailure = "deployment.testFailure";
- public static final String noTests = "deployment.noTests";
- public static final String error = "deployment.error";
- public static final String abort = "deployment.abort";
- public static final String cancel = "deployment.cancel";
- public static final String success = "deployment.success";
- public static final String quotaExceeded = "deployment.quotaExceeded";
+ public static final String start = ConfigServerMetrics.DEPLOYMENT_START.baseName();
+ public static final String nodeAllocationFailure = ConfigServerMetrics.DEPLOYMENT_NODE_ALLOCATION_FAILURE.baseName();
+ public static final String endpointCertificateTimeout = ConfigServerMetrics.DEPLOYMENT_ENDPOINT_CERTIFICATE_TIMEOUT.baseName();
+ public static final String deploymentFailure = ConfigServerMetrics.DEPLOYMENT_DEPLOYMENT_FAILURE.baseName();
+ public static final String invalidApplication = ConfigServerMetrics.DEPLOYMENT_INVALID_APPLICATION.baseName();
+ public static final String convergenceFailure = ConfigServerMetrics.DEPLOYMENT_CONVERGENCE_FAILURE.baseName();
+ public static final String testFailure = ConfigServerMetrics.DEPLOYMENT_TEST_FAILURE.baseName();
+ public static final String noTests = ConfigServerMetrics.DEPLOYMENT_NO_TESTS.baseName();
+ public static final String error = ConfigServerMetrics.DEPLOYMENT_ERROR.baseName();
+ public static final String abort = ConfigServerMetrics.DEPLOYMENT_ABORT.baseName();
+ public static final String cancel = ConfigServerMetrics.DEPLOYMENT_CANCEL.baseName();
+ public static final String success = ConfigServerMetrics.DEPLOYMENT_SUCCESS.baseName();
+ public static final String quotaExceeded = ConfigServerMetrics.DEPLOYMENT_QUOTA_EXCEEDED.baseName();
private final Metric metric;
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/MetricsReporter.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/MetricsReporter.java
index 71f9c37577a..96361b530e6 100644
--- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/MetricsReporter.java
+++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/MetricsReporter.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.vespa.hosted.controller.maintenance;
+import ai.vespa.metrics.ConfigServerMetrics;
import com.yahoo.component.Version;
import com.yahoo.config.application.api.DeploymentInstanceSpec;
import com.yahoo.config.provision.ApplicationId;
@@ -49,15 +50,15 @@ import java.util.stream.Collectors;
public class MetricsReporter extends ControllerMaintainer {
public static final String TENANT_METRIC = "billing.tenants";
- public static final String DEPLOYMENT_FAIL_METRIC = "deployment.failurePercentage";
- public static final String DEPLOYMENT_AVERAGE_DURATION = "deployment.averageDuration";
- public static final String DEPLOYMENT_FAILING_UPGRADES = "deployment.failingUpgrades";
+ public static final String DEPLOYMENT_FAIL_METRIC = ConfigServerMetrics.DEPLOYMENT_FAILURE_PERCENTAGE.baseName();
+ public static final String DEPLOYMENT_AVERAGE_DURATION = ConfigServerMetrics.DEPLOYMENT_AVERAGE_DURATION.baseName();
+ public static final String DEPLOYMENT_FAILING_UPGRADES = ConfigServerMetrics.DEPLOYMENT_FAILING_UPGRADES.baseName();
public static final String DEPLOYMENT_BUILD_AGE_SECONDS = "deployment.buildAgeSeconds";
- public static final String DEPLOYMENT_WARNINGS = "deployment.warnings";
+ public static final String DEPLOYMENT_WARNINGS = ConfigServerMetrics.DEPLOYMENT_WARNINGS.baseName();
public static final String DEPLOYMENT_OVERDUE_UPGRADE = "deployment.overdueUpgradeSeconds";
- public static final String OS_CHANGE_DURATION = "deployment.osChangeDuration";
+ public static final String OS_CHANGE_DURATION = ConfigServerMetrics.DEPLOYMENT_OS_CHANGE_DURATION.baseName();
public static final String PLATFORM_CHANGE_DURATION = "deployment.platformChangeDuration";
- public static final String OS_NODE_COUNT = "deployment.nodeCountByOsVersion";
+ public static final String OS_NODE_COUNT = ConfigServerMetrics.DEPLOYMENT_NODE_COUNT_BY_OS_VERSION.baseName();
public static final String PLATFORM_NODE_COUNT = "deployment.nodeCountByPlatformVersion";
public static final String BROKEN_SYSTEM_VERSION = "deployment.brokenSystemVersion";
public static final String REMAINING_ROTATIONS = "remaining_rotations";