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