diff options
author | David Pursehouse <dpursehouse@collab.net> | 2020-01-31 12:58:49 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2020-01-31 12:58:49 +0000 |
commit | c733e8aa38fe499f03061af6ad0b2925673f8bb0 (patch) | |
tree | 30cfd03879b991e517a3d8084e9b394a2f5a43b5 | |
parent | 3b569a3fcb6fbcbf46518d3d1c0677868f663eba (diff) | |
parent | ae4a73b87c27288ee0d9de18acc2637c9ae0ef12 (diff) |
Merge "Improve Jetty thread pool metrics" into stable-2.16
-rw-r--r-- | Documentation/metrics.txt | 7 | ||||
-rw-r--r-- | java/com/google/gerrit/pgm/http/jetty/JettyMetrics.java | 24 |
2 files changed, 19 insertions, 12 deletions
diff --git a/Documentation/metrics.txt b/Documentation/metrics.txt index 37d6d01c85..1a756d1f04 100644 --- a/Documentation/metrics.txt +++ b/Documentation/metrics.txt @@ -56,6 +56,13 @@ objects needing finalization. === HTTP +* `http/server/jetty/threadpool/min_pool_size`: Minimum thread pool size +* `http/server/jetty/threadpool/max_pool_size`: Maximum thread pool size +* `http/server/jetty/threadpool/pool_size`: Current thread pool size +* `http/server/jetty/threadpool/idle_threads`: Idle threads +* `http/server/jetty/threadpool/active_threads`: Active threads +* `http/server/jetty/threadpool/reserved_threads`: Reserved threads +* `http/server/jetty/threadpool/queue_size`: Queued requests waiting for a thread * `http/server/error_count`: Rate of REST API error responses. * `http/server/success_count`: Rate of REST API success responses. * `http/server/rest_api/count`: Rate of REST API calls by view. diff --git a/java/com/google/gerrit/pgm/http/jetty/JettyMetrics.java b/java/com/google/gerrit/pgm/http/jetty/JettyMetrics.java index 92edf403d1..b6a2d38710 100644 --- a/java/com/google/gerrit/pgm/http/jetty/JettyMetrics.java +++ b/java/com/google/gerrit/pgm/http/jetty/JettyMetrics.java @@ -28,42 +28,42 @@ public class JettyMetrics { JettyMetrics(JettyServer jetty, MetricMaker metrics) { CallbackMetric0<Integer> minPoolSize = metrics.newCallbackMetric( - "httpd/jetty/threadpool/min_pool_size", + "http/server/jetty/threadpool/min_pool_size", Integer.class, new Description("Minimum thread pool size").setGauge()); CallbackMetric0<Integer> maxPoolSize = metrics.newCallbackMetric( - "httpd/jetty/threadpool/max_pool_size", + "http/server/jetty/threadpool/max_pool_size", Integer.class, new Description("Maximum thread pool size").setGauge()); CallbackMetric0<Integer> poolSize = metrics.newCallbackMetric( - "httpd/jetty/threadpool/pool_size", + "http/server/jetty/threadpool/pool_size", Integer.class, new Description("Current thread pool size").setGauge()); CallbackMetric0<Integer> idleThreads = metrics.newCallbackMetric( - "httpd/jetty/threadpool/idle_threads", + "http/server/jetty/threadpool/idle_threads", Integer.class, - new Description("Idle httpd threads").setGauge().setUnit("threads")); + new Description("Idle threads").setGauge().setUnit("threads")); CallbackMetric0<Integer> busyThreads = metrics.newCallbackMetric( - "httpd/jetty/threadpool/active_threads", + "http/server/jetty/threadpool/active_threads", Integer.class, - new Description("Active httpd threads").setGauge().setUnit("threads")); + new Description("Active threads").setGauge().setUnit("threads")); CallbackMetric0<Integer> reservedThreads = metrics.newCallbackMetric( - "httpd/jetty/threadpool/reserved_threads", + "http/server/jetty/threadpool/reserved_threads", Integer.class, - new Description("Reserved httpd threads").setGauge().setUnit("threads")); + new Description("Reserved threads").setGauge().setUnit("threads")); CallbackMetric0<Integer> queueSize = metrics.newCallbackMetric( - "httpd/jetty/threadpool/queue_size", + "http/server/jetty/threadpool/queue_size", Integer.class, - new Description("Thread pool queue size").setGauge().setUnit("requests")); + new Description("Queued requests waiting for a thread").setGauge().setUnit("requests")); CallbackMetric0<Boolean> lowOnThreads = metrics.newCallbackMetric( - "httpd/jetty/threadpool/is_low_on_threads", + "http/server/jetty/threadpool/is_low_on_threads", Boolean.class, new Description("Whether thread pool is low on threads").setGauge()); JettyServer.Metrics jettyMetrics = jetty.getMetrics(); |