David Pursehouse | 8ad1173 | 2016-08-29 15:00:14 +0900 | [diff] [blame] | 1 | = Gerrit Code Review - Metrics |
| 2 | |
| 3 | Metrics about Gerrit's internal state can be sent to external monitoring systems |
| 4 | via plugins. See the link:dev-plugins.html#metrics[plugin documentation] for |
| 5 | details of plugin implementations. |
| 6 | |
| 7 | == Metrics |
| 8 | |
| 9 | The following metrics are reported. |
| 10 | |
| 11 | === General |
| 12 | |
| 13 | * `build/label`: Version of Gerrit server software. |
| 14 | * `events`: Triggered events. |
| 15 | |
Edwin Kempin | 9c6f12c | 2018-01-04 14:21:40 +0100 | [diff] [blame] | 16 | === Actions |
| 17 | |
Patrick Hiesel | 256be8d | 2019-04-25 09:46:56 +0200 | [diff] [blame] | 18 | * `action/retry_attempt_count`: Number of retry attempts made |
| 19 | by RetryHelper to execute an action (0 == single attempt, no retry) |
Edwin Kempin | 9c6f12c | 2018-01-04 14:21:40 +0100 | [diff] [blame] | 20 | * `action/retry_timeout_count`: Number of action executions of RetryHelper |
| 21 | that ultimately timed out |
Edwin Kempin | ae84332 | 2019-08-02 13:16:55 +0200 | [diff] [blame] | 22 | * `action/auto_retry_count`: Number of automatic retries with tracing |
Edwin Kempin | 755504f | 2019-08-21 10:40:56 +0200 | [diff] [blame] | 23 | * `action/failures_on_auto_retry_count`: Number of failures on auto retry |
Edwin Kempin | 9c6f12c | 2018-01-04 14:21:40 +0100 | [diff] [blame] | 24 | |
Han-Wen Nienhuys | f7f6712 | 2018-10-08 16:45:49 +0200 | [diff] [blame] | 25 | === Pushes |
| 26 | |
| 27 | * `receivecommits/changes`: histogram of number of changes processed |
Han-Wen Nienhuys | 44b6e76 | 2019-03-06 13:38:24 +0100 | [diff] [blame] | 28 | in a single upload, split up by update type (change created/updated, |
| 29 | change autoclosed). |
Han-Wen Nienhuys | f7f6712 | 2018-10-08 16:45:49 +0200 | [diff] [blame] | 30 | * `receivecommits/latency`: latency per change for processing a push, |
| 31 | split up by update type (create+replace, and autoclose) |
Han-Wen Nienhuys | 44b6e76 | 2019-03-06 13:38:24 +0100 | [diff] [blame] | 32 | * `receivecommits/push_latency`: total latency for processing a push, |
| 33 | split up by update type (create+replace, autoclose, normal) |
Han-Wen Nienhuys | f7f6712 | 2018-10-08 16:45:49 +0200 | [diff] [blame] | 34 | * `receivecommits/timeout`: number of timeouts during push processing. |
| 35 | |
David Pursehouse | 8ad1173 | 2016-08-29 15:00:14 +0900 | [diff] [blame] | 36 | === Process |
| 37 | |
| 38 | * `proc/birth_timestamp`: Time at which the Gerrit process started. |
| 39 | * `proc/uptime`: Uptime of the Gerrit process. |
| 40 | * `proc/cpu/usage`: CPU time used by the Gerrit process. |
| 41 | * `proc/num_open_fds`: Number of open file descriptors. |
| 42 | * `proc/jvm/memory/heap_committed`: Amount of memory guaranteed for user objects. |
| 43 | * `proc/jvm/memory/heap_used`: Amount of memory holding user objects. |
| 44 | * `proc/jvm/memory/non_heap_committed`: Amount of memory guaranteed for classes, |
| 45 | etc. |
| 46 | * `proc/jvm/memory/non_heap_used`: Amount of memory holding classes, etc. |
| 47 | * `proc/jvm/memory/object_pending_finalization_count`: Approximate number of |
| 48 | objects needing finalization. |
| 49 | * `proc/jvm/gc/count`: Number of GCs. |
| 50 | * `proc/jvm/gc/time`: Approximate accumulated GC elapsed time. |
| 51 | * `proc/jvm/thread/num_live`: Current live thread count. |
| 52 | |
| 53 | === Caches |
| 54 | |
| 55 | * `caches/memory_cached`: Memory entries. |
| 56 | * `caches/memory_hit_ratio`: Memory hit ratio. |
| 57 | * `caches/memory_eviction_count`: Memory eviction count. |
| 58 | * `caches/disk_cached`: Disk entries used by persistent cache. |
| 59 | * `caches/disk_hit_ratio`: Disk hit ratio for persistent cache. |
| 60 | |
Patrick Hiesel | 8b38428 | 2019-08-09 10:51:30 +0200 | [diff] [blame] | 61 | === Change |
| 62 | |
| 63 | * `change/submit_rule_evaluation`: Latency for evaluating submit rules on a change. |
| 64 | * `change/submit_type_evaluation`: Latency for evaluating the submit type on a change. |
| 65 | |
David Pursehouse | 8ad1173 | 2016-08-29 15:00:14 +0900 | [diff] [blame] | 66 | === HTTP |
| 67 | |
| 68 | * `http/server/error_count`: Rate of REST API error responses. |
| 69 | * `http/server/success_count`: Rate of REST API success responses. |
| 70 | * `http/server/rest_api/count`: Rate of REST API calls by view. |
Patrick Hiesel | 010e49b | 2017-12-14 17:50:21 +0100 | [diff] [blame] | 71 | * `http/server/rest_api/change_id_type`: Rate of REST API calls by change ID type. |
David Pursehouse | 8ad1173 | 2016-08-29 15:00:14 +0900 | [diff] [blame] | 72 | * `http/server/rest_api/error_count`: Rate of REST API calls by view. |
| 73 | * `http/server/rest_api/server_latency`: REST API call latency by view. |
| 74 | * `http/server/rest_api/response_bytes`: Size of REST API response on network |
| 75 | (may be gzip compressed) by view. |
Patrick Hiesel | 1a4041f | 2018-04-06 10:20:05 +0200 | [diff] [blame] | 76 | * `http/server/rest_api/change_json/to_change_info_latency`: Latency for |
| 77 | toChangeInfo invocations in ChangeJson. |
| 78 | * `http/server/rest_api/change_json/to_change_infos_latency`: Latency for |
| 79 | toChangeInfos invocations in ChangeJson. |
| 80 | * `http/server/rest_api/change_json/format_query_results_latency`: Latency for |
| 81 | formatQueryResults invocations in ChangeJson. |
Patrick Hiesel | 4a56ff0 | 2018-05-08 15:33:45 +0200 | [diff] [blame] | 82 | * `http/server/rest_api/ui_actions/latency`: Latency for RestView#getDescription calls. |
David Pursehouse | 8ad1173 | 2016-08-29 15:00:14 +0900 | [diff] [blame] | 83 | |
| 84 | === Query |
| 85 | |
| 86 | * `query/query_latency`: Successful query latency, accumulated over the life |
| 87 | of the process. |
| 88 | |
Eryk Szymanski | 04586d8 | 2018-05-30 22:42:20 +0200 | [diff] [blame] | 89 | === Core Queues |
Eryk Szymanski | 366c3a6 | 2018-05-03 15:04:12 +0200 | [diff] [blame] | 90 | |
Eryk Szymanski | 04586d8 | 2018-05-30 22:42:20 +0200 | [diff] [blame] | 91 | The following queues support metrics: |
| 92 | |
| 93 | * default `WorkQueue` |
| 94 | * index batch |
| 95 | * index interactive |
| 96 | * receive commits |
| 97 | * send email |
| 98 | * ssh batch worker |
| 99 | * ssh command start |
| 100 | * ssh interactive worker |
| 101 | * ssh stream worker |
| 102 | |
| 103 | Each queue provides the following metrics: |
| 104 | |
| 105 | * `queue/<queue_name>/pool_size`: Current number of threads in the pool |
| 106 | * `queue/<queue_name>/max_pool_size`: Maximum allowed number of threads in the pool |
| 107 | * `queue/<queue_name>/active_threads`: Number of threads that are actively executing tasks |
| 108 | * `queue/<queue_name>/scheduled_tasks`: Number of scheduled tasks in the queue |
| 109 | * `queue/<queue_name>/total_scheduled_tasks_count`: Total number of tasks that have been scheduled |
| 110 | * `queue/<queue_name>/total_completed_tasks_count`: Total number of tasks that have completed execution |
Eryk Szymanski | 366c3a6 | 2018-05-03 15:04:12 +0200 | [diff] [blame] | 111 | |
David Pursehouse | 8ad1173 | 2016-08-29 15:00:14 +0900 | [diff] [blame] | 112 | === SSH sessions |
| 113 | |
| 114 | * `sshd/sessions/connected`: Number of currently connected SSH sessions. |
| 115 | * `sshd/sessions/created`: Rate of new SSH sessions. |
| 116 | * `sshd/sessions/authentication_failures`: Rate of SSH authentication failures. |
| 117 | |
Han-Wen Nienhuys | 61f6565 | 2017-06-12 19:46:04 +0200 | [diff] [blame] | 118 | === Topics |
| 119 | |
| 120 | * `topic/cross_project_submit`: number of cross-project topic submissions. |
| 121 | * `topic/cross_project_submit_completed`: number of cross-project |
| 122 | topic submissions that concluded successfully. |
| 123 | |
David Pursehouse | 8ad1173 | 2016-08-29 15:00:14 +0900 | [diff] [blame] | 124 | === JGit |
| 125 | |
| 126 | * `jgit/block_cache/cache_used`: Bytes of memory retained in JGit block cache. |
| 127 | * `jgit/block_cache/open_files`: File handles held open by JGit block cache. |
| 128 | |
| 129 | === Git |
| 130 | |
| 131 | * `git/upload-pack/request_count`: Total number of git-upload-pack requests. |
| 132 | * `git/upload-pack/phase_counting`: Time spent in the 'Counting...' phase. |
| 133 | * `git/upload-pack/phase_compressing`: Time spent in the 'Compressing...' phase. |
| 134 | * `git/upload-pack/phase_writing`: Time spent transferring bytes to client. |
| 135 | * `git/upload-pack/pack_bytes`: Distribution of sizes of packs sent to clients. |
| 136 | |
Edwin Kempin | 516167d | 2016-11-25 14:42:11 +0100 | [diff] [blame] | 137 | === BatchUpdate |
| 138 | |
| 139 | * `batch_update/execute_change_ops`: BatchUpdate change update latency, |
| 140 | excluding reindexing |
| 141 | |
David Pursehouse | 8ad1173 | 2016-08-29 15:00:14 +0900 | [diff] [blame] | 142 | === NoteDb |
| 143 | |
Edwin Kempin | 8900677 | 2019-12-30 15:57:23 +0100 | [diff] [blame^] | 144 | * `notedb/update_latency`: NoteDb update latency for changes. |
| 145 | * `notedb/stage_update_latency`: Latency for staging change updates to NoteDb. |
| 146 | * `notedb/read_latency`: NoteDb read latency for changes. |
| 147 | * `notedb/parse_latency`: NoteDb parse latency for changes. |
Patrick Hiesel | 42b47b1 | 2019-07-22 09:32:37 +0200 | [diff] [blame] | 148 | * `notedb/external_id_cache_load_count`: Total number of times the external ID |
| 149 | cache loader was called. |
| 150 | * `notedb/external_id_partial_read_latency`: Latency for generating a new external ID |
| 151 | cache state from a prior state. |
Edwin Kempin | 69608c4 | 2017-03-30 17:20:22 +0200 | [diff] [blame] | 152 | * `notedb/external_id_update_count`: Total number of external ID updates. |
| 153 | * `notedb/read_all_external_ids_latency`: Latency for reading all |
| 154 | external ID's from NoteDb. |
David Pursehouse | 8ad1173 | 2016-08-29 15:00:14 +0900 | [diff] [blame] | 155 | |
Patrick Hiesel | f71bafe | 2018-09-24 16:42:54 +0200 | [diff] [blame] | 156 | === Permissions |
| 157 | |
| 158 | * `permissions/project_state/computation_latency`: Latency to compute current access |
| 159 | sections on a project by traversing it's parents. |
| 160 | * `permissions/permission_collection/filter_latency`: Latency to filter access sections |
| 161 | by user and ref. |
Patrick Hiesel | c84c4e6 | 2018-09-28 13:02:25 +0200 | [diff] [blame] | 162 | * `permissions/ref_filter/full_filter_count`: Rate of full ref filter operations |
| 163 | * `permissions/ref_filter/skip_filter_count`: Rate of ref filter operations where |
| 164 | we skip full evaluation because the user can read all refs |
Patrick Hiesel | f71bafe | 2018-09-24 16:42:54 +0200 | [diff] [blame] | 165 | |
Edwin Kempin | f68598a | 2016-11-15 17:38:49 -0800 | [diff] [blame] | 166 | === Reviewer Suggestion |
| 167 | |
| 168 | * `reviewer_suggestion/query_accounts`: Latency for querying accounts for |
| 169 | reviewer suggestion. |
| 170 | * `reviewer_suggestion/recommend_accounts`: Latency for recommending accounts |
| 171 | for reviewer suggestion. |
| 172 | * `reviewer_suggestion/load_accounts`: Latency for loading accounts for |
| 173 | reviewer suggestion. |
| 174 | * `reviewer_suggestion/query_groups`: Latency for querying groups for reviewer |
| 175 | suggestion. |
| 176 | |
Dave Borowitz | 80fba94 | 2017-06-28 13:20:30 -0400 | [diff] [blame] | 177 | === Repo Sequences |
| 178 | |
| 179 | * `sequence/next_id_latency`: Latency of requesting IDs from repo sequences. |
| 180 | |
Edwin Kempin | ec7e81f | 2018-09-14 15:21:10 +0200 | [diff] [blame] | 181 | === Plugin |
| 182 | |
Edwin Kempin | 49975d8 | 2018-09-19 15:14:51 +0200 | [diff] [blame] | 183 | * `plugin/latency`: Latency for plugin invocation. |
Edwin Kempin | ec7e81f | 2018-09-14 15:21:10 +0200 | [diff] [blame] | 184 | * `plugin/error_count`: Number of plugin errors. |
| 185 | |
Edwin Kempin | 8e07cf6 | 2018-10-25 16:25:25 +0200 | [diff] [blame] | 186 | === Group |
| 187 | |
| 188 | * `group/guess_relevant_groups_latency`: Latency for guessing relevant groups. |
| 189 | |
David Pursehouse | 8ad1173 | 2016-08-29 15:00:14 +0900 | [diff] [blame] | 190 | === Replication Plugin |
| 191 | |
| 192 | * `plugins/replication/replication_latency`: Time spent pushing to remote |
| 193 | destination. |
| 194 | * `plugins/replication/replication_delay`: Time spent waiting before pushing to |
| 195 | remote destination. |
| 196 | * `plugins/replication/replication_retries`: Number of retries when pushing to |
| 197 | remote destination. |
| 198 | |
Minh Thai | 44e95ee | 2017-02-28 17:39:37 -0800 | [diff] [blame] | 199 | === License |
| 200 | |
| 201 | * `license/cla_check_count`: Total number of CLA check requests. |
| 202 | |
David Pursehouse | 8ad1173 | 2016-08-29 15:00:14 +0900 | [diff] [blame] | 203 | GERRIT |
| 204 | ------ |
| 205 | Part of link:index.html[Gerrit Code Review] |
| 206 | |
| 207 | SEARCHBOX |
| 208 | --------- |