diff options
author | Yngve Aasheim <yngveaasheim@users.noreply.github.com> | 2023-01-12 13:48:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-12 13:48:48 +0100 |
commit | ee59cc51949b0b909f586634dd582ff0336053a4 (patch) | |
tree | 89919a2a857654918e33a3370ab5c7cece6227c6 | |
parent | 61acd5aa3a1bf9098c87fdc098c7982301f0910c (diff) | |
parent | cca3eb91a8c69506b667213c7d39ed96c119f2eb (diff) |
Merge pull request #25533 from vespa-engine/yngveaasheim/use-enum-for-handled-metrics
Use enum for 'handled' metrics
-rw-r--r-- | config-model/src/main/java/com/yahoo/vespa/model/admin/monitoring/VespaMetricSet.java | 8 | ||||
-rw-r--r-- | container-core/src/main/java/com/yahoo/metrics/ContainerMetrics.java | 3 |
2 files changed, 6 insertions, 5 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/admin/monitoring/VespaMetricSet.java b/config-model/src/main/java/com/yahoo/vespa/model/admin/monitoring/VespaMetricSet.java index 719e64891e0..e66ebe10f52 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/admin/monitoring/VespaMetricSet.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/admin/monitoring/VespaMetricSet.java @@ -117,11 +117,9 @@ public class VespaMetricSet { addMetric(metrics, "jdisc.http.requests", List.of("rate", "count")); - metrics.add(new Metric("handled.requests.count")); - metrics.add(new Metric("handled.latency.max")); - metrics.add(new Metric("handled.latency.sum")); - metrics.add(new Metric("handled.latency.count")); - + addMetric(metrics, ContainerMetrics.HANDLED_REQUESTS.count()); + addMetric(metrics, ContainerMetrics.HANDLED_LATENCY.baseName(), List.of("max", "sum", "count")); + metrics.add(new Metric("serverRejectedRequests.rate")); // TODO: Remove on Vespa 9. Use jdisc.thread_pool.rejected_tasks. metrics.add(new Metric("serverRejectedRequests.count")); // TODO: Remove on Vespa 9. Use jdisc.thread_pool.rejected_tasks. diff --git a/container-core/src/main/java/com/yahoo/metrics/ContainerMetrics.java b/container-core/src/main/java/com/yahoo/metrics/ContainerMetrics.java index 5aacf53ead9..a595cf8b049 100644 --- a/container-core/src/main/java/com/yahoo/metrics/ContainerMetrics.java +++ b/container-core/src/main/java/com/yahoo/metrics/ContainerMetrics.java @@ -35,6 +35,9 @@ public enum ContainerMetrics { SERVER_NUM_OPEN_CONNECTIONS("serverNumOpenConnections", Unit.CONNECTION, "The number of currently open connections"), SERVER_NUM_CONNECTIONS("serverNumConnections", Unit.CONNECTION, "The total number of connections opened"), + HANDLED_REQUESTS("handled.requests", Unit.OPERATION, "The number of requests handled per metrics snapshot"), + HANDLED_LATENCY("handled.latency", Unit.MILLISECOND, "The time used for requests during this metrics snapshot"), + HTTPAPI_LATENCY("httpapi_latency", Unit.MILLISECOND, "Duration for requests to the HTTP document APIs"), HTTPAPI_PENDING("httpapi_pending", Unit.OPERATION, "Document operations pending execution"), HTTPAPI_NUM_OPERATIONS("httpapi_num_operations", Unit.OPERATION, "Total number of document operations performed"), |