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