blob: a8eb946e6b3405ea919d1ee3dd4483f8182dcc1d [file] [log] [blame]
David Pursehouse8ad11732016-08-29 15:00:14 +09001= Gerrit Code Review - Metrics
2
3Metrics about Gerrit's internal state can be sent to external monitoring systems
4via plugins. See the link:dev-plugins.html#metrics[plugin documentation] for
5details of plugin implementations.
6
7== Metrics
8
9The following metrics are reported.
10
11=== General
12
13* `build/label`: Version of Gerrit server software.
14* `events`: Triggered events.
15
Edwin Kempin9c6f12c2018-01-04 14:21:40 +010016=== Actions
17
Patrick Hiesel256be8d2019-04-25 09:46:56 +020018* `action/retry_attempt_count`: Number of retry attempts made
19by RetryHelper to execute an action (0 == single attempt, no retry)
Edwin Kempin9c6f12c2018-01-04 14:21:40 +010020* `action/retry_timeout_count`: Number of action executions of RetryHelper
21that ultimately timed out
Edwin Kempinae843322019-08-02 13:16:55 +020022* `action/auto_retry_count`: Number of automatic retries with tracing
Edwin Kempin755504f2019-08-21 10:40:56 +020023* `action/failures_on_auto_retry_count`: Number of failures on auto retry
Edwin Kempin9c6f12c2018-01-04 14:21:40 +010024
Edwin Kempin40c29892021-09-01 15:58:05 +020025[[cancellations]]
Edwin Kempin63a3f242021-08-05 13:35:37 +020026=== Cancellations
27
Edwin Kempin0bc9df92021-08-05 16:15:09 +020028* `cancellation/advisory_deadline_count`: Exceeded advisory deadlines by request
Edwin Kempin63a3f242021-08-05 13:35:37 +020029* `cancellation/cancelled_requests_count`: Number of request cancellations by
30 request
Edwin Kempin81f27502021-08-10 13:27:24 +020031* `cancellation/receive_timeout_count`: Number of requests that are cancelled
32 because link:config.html#receive.timeout[receive.timout] is exceeded
Edwin Kempin63a3f242021-08-05 13:35:37 +020033
Han-Wen Nienhuysf7f67122018-10-08 16:45:49 +020034=== Pushes
35
36* `receivecommits/changes`: histogram of number of changes processed
Han-Wen Nienhuys44b6e762019-03-06 13:38:24 +010037in a single upload, split up by update type (change created/updated,
38change autoclosed).
Han-Wen Nienhuysf7f67122018-10-08 16:45:49 +020039* `receivecommits/latency`: latency per change for processing a push,
40split up by update type (create+replace, and autoclose)
Han-Wen Nienhuys44b6e762019-03-06 13:38:24 +010041* `receivecommits/push_latency`: total latency for processing a push,
42split up by update type (create+replace, autoclose, normal)
Han-Wen Nienhuysf7f67122018-10-08 16:45:49 +020043* `receivecommits/timeout`: number of timeouts during push processing.
44
David Pursehouse8ad11732016-08-29 15:00:14 +090045=== Process
46
47* `proc/birth_timestamp`: Time at which the Gerrit process started.
48* `proc/uptime`: Uptime of the Gerrit process.
Matthias Sohne2b3f8e2020-03-06 13:22:26 +010049* `proc/cpu/num_cores`: Number of processors available to the Java virtual machine.
David Pursehouse8ad11732016-08-29 15:00:14 +090050* `proc/cpu/usage`: CPU time used by the Gerrit process.
Matthias Sohnfa8de022020-03-06 13:39:44 +010051* `proc/cpu/system_load`: System load average for the last minute.
David Pursehouse8ad11732016-08-29 15:00:14 +090052* `proc/num_open_fds`: Number of open file descriptors.
53* `proc/jvm/memory/heap_committed`: Amount of memory guaranteed for user objects.
54* `proc/jvm/memory/heap_used`: Amount of memory holding user objects.
55* `proc/jvm/memory/non_heap_committed`: Amount of memory guaranteed for classes,
56etc.
57* `proc/jvm/memory/non_heap_used`: Amount of memory holding classes, etc.
58* `proc/jvm/memory/object_pending_finalization_count`: Approximate number of
59objects needing finalization.
60* `proc/jvm/gc/count`: Number of GCs.
61* `proc/jvm/gc/time`: Approximate accumulated GC elapsed time.
Matthias Sohndb2ebd42021-04-09 01:06:53 +020062* `proc/jvm/memory/pool/committed/<pool name>`: Committed amount of memory for pool.
63* `proc/jvm/memory/pool/max/<pool name>`: Maximum amount of memory for pool.
64* `proc/jvm/memory/pool/used/<pool name>`: Used amount of memory for pool.
David Pursehouse8ad11732016-08-29 15:00:14 +090065* `proc/jvm/thread/num_live`: Current live thread count.
Matthias Sohn9fc47ca2020-03-06 13:15:10 +010066* `proc/jvm/thread/num_daemon_live`: Current live daemon threads count.
67* `proc/jvm/thread/num_peak_live`: Peak live thread count since the Java virtual machine started or peak was reset.
68* `proc/jvm/thread/num_total_started`: Total number of threads created and also started since the Java virtual machine started.
Matthias Sohn74fbf8d2020-05-19 23:35:49 +020069* `proc/jvm/thread/num_deadlocked_threads`: Number of threads that are deadlocked waiting for object monitors or ownable synchronizers.
70 If deadlocks waiting for ownable synchronizers can be monitored depends on the capabilities of the used JVM.
David Pursehouse8ad11732016-08-29 15:00:14 +090071
72=== Caches
73
74* `caches/memory_cached`: Memory entries.
75* `caches/memory_hit_ratio`: Memory hit ratio.
76* `caches/memory_eviction_count`: Memory eviction count.
77* `caches/disk_cached`: Disk entries used by persistent cache.
78* `caches/disk_hit_ratio`: Disk hit ratio for persistent cache.
Patrick Hieseld70f37f2020-04-16 14:12:31 +020079* `caches/refresh_count`: The number of refreshes per cache with an indicator if a reload was necessary.
David Pursehouse8ad11732016-08-29 15:00:14 +090080
Antoine Mussoeeebe412020-11-12 23:14:46 +010081Cache disk metrics are expensive to compute on larger installations and are not
82computed by default. They can be enabled via the
83link:config.gerrit.html#cache.enableDiskStatMetrics[`cache.enableDiskStatMetrics`]
84setting.
85
Patrick Hiesel8b384282019-08-09 10:51:30 +020086=== Change
87
88* `change/submit_rule_evaluation`: Latency for evaluating submit rules on a change.
89* `change/submit_type_evaluation`: Latency for evaluating the submit type on a change.
90
Youssef Elghareeba5c25452021-02-03 19:36:49 +010091=== Comments
92
93* `ported_comments/as_patchset_level`: Total number of comments ported as patchset-level comments.
94* `ported_comments/as_file_level`: Total number of comments ported as file-level comments.
95* `ported_comments/as_range_comments`: Total number of comments having line/range values in the ported patchset.
96
David Pursehouse8ad11732016-08-29 15:00:14 +090097=== HTTP
98
Matthias Sohndb1e7862020-01-31 10:37:47 +010099==== Jetty
100
Matthias Sohnbaa006b2020-02-13 16:01:56 +0100101* `http/server/jetty/connections/connections`: The current number of open connections
102* `http/server/jetty/connections/connections_total`: The total number of connections opened
103* `http/server/jetty/connections/connections_duration_max`: The max duration of a connection in ms
104* `http/server/jetty/connections/connections_duration_mean`: The mean duration of a connection in ms
105* `http/server/jetty/connections/connections_duration_stdev`: The standard deviation of the duration of a connection in ms
106* `http/server/jetty/connections/received_messages`: The total number of messages received
107* `http/server/jetty/connections/sent_messages`: The total number of messages sent
108* `http/server/jetty/connections/received_bytes`: Total number of bytes received by tracked connections
109* `http/server/jetty/connections/sent_bytes`: Total number of bytes sent by tracked connections"
Matthias Sohnae4a73b2020-01-31 10:37:47 +0100110* `http/server/jetty/threadpool/active_threads`: Active threads
Matthias Sohndb1e7862020-01-31 10:37:47 +0100111* `http/server/jetty/threadpool/idle_threads`: Idle threads
Matthias Sohnae4a73b2020-01-31 10:37:47 +0100112* `http/server/jetty/threadpool/reserved_threads`: Reserved threads
Matthias Sohndb1e7862020-01-31 10:37:47 +0100113* `http/server/jetty/threadpool/max_pool_size`: Maximum thread pool size
114* `http/server/jetty/threadpool/min_pool_size`: Minimum thread pool size
115* `http/server/jetty/threadpool/pool_size`: Current thread pool size
Matthias Sohnae4a73b2020-01-31 10:37:47 +0100116* `http/server/jetty/threadpool/queue_size`: Queued requests waiting for a thread
Matthias Sohndb1e7862020-01-31 10:37:47 +0100117
Luca Milanesioed2eb742021-05-04 23:26:47 +0100118==== LDAP
119
120* `ldap/login_latency`: Latency of logins.
121* `ldap/user_search_latency`: Latency for searching the user account.
122* `ldap/group_search_latency`: Latency for querying the group memberships of an account.
123* `ldap/group_expansion_latency`: Latency for expanding nested groups.
124
Matthias Sohndb1e7862020-01-31 10:37:47 +0100125==== REST API
126
David Pursehouse8ad11732016-08-29 15:00:14 +0900127* `http/server/error_count`: Rate of REST API error responses.
128* `http/server/success_count`: Rate of REST API success responses.
129* `http/server/rest_api/count`: Rate of REST API calls by view.
Patrick Hiesel010e49b2017-12-14 17:50:21 +0100130* `http/server/rest_api/change_id_type`: Rate of REST API calls by change ID type.
David Pursehouse8ad11732016-08-29 15:00:14 +0900131* `http/server/rest_api/error_count`: Rate of REST API calls by view.
132* `http/server/rest_api/server_latency`: REST API call latency by view.
133* `http/server/rest_api/response_bytes`: Size of REST API response on network
134(may be gzip compressed) by view.
Patrick Hiesel1a4041f2018-04-06 10:20:05 +0200135* `http/server/rest_api/change_json/to_change_info_latency`: Latency for
136toChangeInfo invocations in ChangeJson.
137* `http/server/rest_api/change_json/to_change_infos_latency`: Latency for
138toChangeInfos invocations in ChangeJson.
139* `http/server/rest_api/change_json/format_query_results_latency`: Latency for
140formatQueryResults invocations in ChangeJson.
Patrick Hiesel4a56ff02018-05-08 15:33:45 +0200141* `http/server/rest_api/ui_actions/latency`: Latency for RestView#getDescription calls.
David Pursehouse8ad11732016-08-29 15:00:14 +0900142
143=== Query
144
145* `query/query_latency`: Successful query latency, accumulated over the life
146of the process.
147
Eryk Szymanski04586d82018-05-30 22:42:20 +0200148=== Core Queues
Eryk Szymanski366c3a62018-05-03 15:04:12 +0200149
Eryk Szymanski04586d82018-05-30 22:42:20 +0200150The following queues support metrics:
151
152* default `WorkQueue`
153* index batch
154* index interactive
155* receive commits
156* send email
157* ssh batch worker
158* ssh command start
159* ssh interactive worker
160* ssh stream worker
161
162Each queue provides the following metrics:
163
164* `queue/<queue_name>/pool_size`: Current number of threads in the pool
165* `queue/<queue_name>/max_pool_size`: Maximum allowed number of threads in the pool
166* `queue/<queue_name>/active_threads`: Number of threads that are actively executing tasks
167* `queue/<queue_name>/scheduled_tasks`: Number of scheduled tasks in the queue
168* `queue/<queue_name>/total_scheduled_tasks_count`: Total number of tasks that have been scheduled
169* `queue/<queue_name>/total_completed_tasks_count`: Total number of tasks that have completed execution
Eryk Szymanski366c3a62018-05-03 15:04:12 +0200170
David Pursehouse8ad11732016-08-29 15:00:14 +0900171=== SSH sessions
172
173* `sshd/sessions/connected`: Number of currently connected SSH sessions.
174* `sshd/sessions/created`: Rate of new SSH sessions.
175* `sshd/sessions/authentication_failures`: Rate of SSH authentication failures.
176
Han-Wen Nienhuys61f65652017-06-12 19:46:04 +0200177=== Topics
178
179* `topic/cross_project_submit`: number of cross-project topic submissions.
180* `topic/cross_project_submit_completed`: number of cross-project
181topic submissions that concluded successfully.
182
David Pursehouse8ad11732016-08-29 15:00:14 +0900183=== JGit
184
Matthias Sohn11b517e2020-03-05 17:43:12 +0100185* `jgit/block_cache/cache_used` : Bytes of memory retained in JGit block cache.
186* `jgit/block_cache/open_files` : File handles held open by JGit block cache.
187* `avg_load_time` : Average time to load a cache entry for JGit block cache.
188* `total_load_time` : Total time to load cache entries for JGit block cache.
Matthias Sohn028a01d2020-02-05 11:29:16 +0100189* `eviction_count` : Cache evictions for JGit block cache.
190* `eviction_ratio` : Cache eviction ratio for JGit block cache.
191* `hit_count` : Cache hits for JGit block cache.
192* `hit_ratio` : Cache hit ratio for JGit block cache.
193* `load_failure_count` : Failed cache loads for JGit block cache.
194* `load_failure_ratio` : Failed cache load ratio for JGit block cache.
195* `load_success_count` : Successful cache loads for JGit block cache.
196* `miss_count` : Cache misses for JGit block cache.
197* `miss_ratio` : Cache miss ratio for JGit block cache.
198* `cache_used_per_repository` : Bytes of memory retained per repository for the top N repositories
199having most data in the cache. The number N of reported repositories is limited to 1000.
David Pursehouse8ad11732016-08-29 15:00:14 +0900200
201=== Git
202
203* `git/upload-pack/request_count`: Total number of git-upload-pack requests.
204* `git/upload-pack/phase_counting`: Time spent in the 'Counting...' phase.
205* `git/upload-pack/phase_compressing`: Time spent in the 'Compressing...' phase.
206* `git/upload-pack/phase_writing`: Time spent transferring bytes to client.
207* `git/upload-pack/pack_bytes`: Distribution of sizes of packs sent to clients.
Patrick Hiesele77fae42021-03-25 10:08:36 +0100208* `git/auto-merge/num_operations`: Number of auto merge operations and context.
209* `git/auto-merge/latency`: Latency of auto merge operations and context.
David Pursehouse8ad11732016-08-29 15:00:14 +0900210
Edwin Kempin516167d2016-11-25 14:42:11 +0100211=== BatchUpdate
212
213* `batch_update/execute_change_ops`: BatchUpdate change update latency,
214excluding reindexing
215
David Pursehouse8ad11732016-08-29 15:00:14 +0900216=== NoteDb
217
Edwin Kempin89006772019-12-30 15:57:23 +0100218* `notedb/update_latency`: NoteDb update latency for changes.
219* `notedb/stage_update_latency`: Latency for staging change updates to NoteDb.
220* `notedb/read_latency`: NoteDb read latency for changes.
221* `notedb/parse_latency`: NoteDb parse latency for changes.
Patrick Hiesel42b47b12019-07-22 09:32:37 +0200222* `notedb/external_id_cache_load_count`: Total number of times the external ID
223 cache loader was called.
224* `notedb/external_id_partial_read_latency`: Latency for generating a new external ID
225 cache state from a prior state.
Edwin Kempin69608c42017-03-30 17:20:22 +0200226* `notedb/external_id_update_count`: Total number of external ID updates.
227* `notedb/read_all_external_ids_latency`: Latency for reading all
228external ID's from NoteDb.
Patrick Hiesela583bca2020-01-30 10:20:26 +0100229* `notedb/read_single_account_config_latency`: Latency for reading a single
230account config from NoteDb.
231* `notedb/read_single_external_id_latency`: Latency for reading a single
Patrick Hieselfd806752020-01-28 15:29:48 +0100232external ID from NoteDb.
David Pursehouse8ad11732016-08-29 15:00:14 +0900233
Patrick Hieself71bafe2018-09-24 16:42:54 +0200234=== Permissions
235
Patrick Hieself71bafe2018-09-24 16:42:54 +0200236* `permissions/permission_collection/filter_latency`: Latency to filter access sections
237by user and ref.
Patrick Hieselc84c4e62018-09-28 13:02:25 +0200238* `permissions/ref_filter/full_filter_count`: Rate of full ref filter operations
239* `permissions/ref_filter/skip_filter_count`: Rate of ref filter operations where
240we skip full evaluation because the user can read all refs
Patrick Hieself71bafe2018-09-24 16:42:54 +0200241
Edwin Kempinf68598a2016-11-15 17:38:49 -0800242=== Reviewer Suggestion
243
244* `reviewer_suggestion/query_accounts`: Latency for querying accounts for
245reviewer suggestion.
246* `reviewer_suggestion/recommend_accounts`: Latency for recommending accounts
247for reviewer suggestion.
248* `reviewer_suggestion/load_accounts`: Latency for loading accounts for
249reviewer suggestion.
250* `reviewer_suggestion/query_groups`: Latency for querying groups for reviewer
251suggestion.
252
Dave Borowitz80fba942017-06-28 13:20:30 -0400253=== Repo Sequences
254
255* `sequence/next_id_latency`: Latency of requesting IDs from repo sequences.
256
Edwin Kempinec7e81f2018-09-14 15:21:10 +0200257=== Plugin
258
Edwin Kempin49975d82018-09-19 15:14:51 +0200259* `plugin/latency`: Latency for plugin invocation.
Edwin Kempinec7e81f2018-09-14 15:21:10 +0200260* `plugin/error_count`: Number of plugin errors.
261
Edwin Kempin8e07cf62018-10-25 16:25:25 +0200262=== Group
263
264* `group/guess_relevant_groups_latency`: Latency for guessing relevant groups.
265
David Pursehouse8ad11732016-08-29 15:00:14 +0900266=== Replication Plugin
267
268* `plugins/replication/replication_latency`: Time spent pushing to remote
269destination.
270* `plugins/replication/replication_delay`: Time spent waiting before pushing to
271remote destination.
272* `plugins/replication/replication_retries`: Number of retries when pushing to
273remote destination.
274
Minh Thai44e95ee2017-02-28 17:39:37 -0800275=== License
276
277* `license/cla_check_count`: Total number of CLA check requests.
278
David Pursehouse8ad11732016-08-29 15:00:14 +0900279GERRIT
280------
281Part of link:index.html[Gerrit Code Review]
282
283SEARCHBOX
284---------