%% Licensed under the Apache License, Version 2.0 (the "License"); you may not
%% use this file except in compliance with the License. You may obtain a copy of
%% the License at
%%
%%   http://www.apache.org/licenses/LICENSE-2.0
%%
%% Unless required by applicable law or agreed to in writing, software
%% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
%% WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
%% License for the specific language governing permissions and limitations under
%% the License.

% Style guide for descriptions: Start with a lowercase letter & do not add
% a trailing full-stop / period
% Please keep this in alphabetical order

{[couchdb, auth_cache_hits], [
    {type, counter},
    {desc, <<"number of authentication cache hits">>}
]}.
{[couchdb, auth_cache_misses], [
    {type, counter},
    {desc, <<"number of authentication cache misses">>}
]}.
{[couchdb, collect_results_time], [
    {type, histogram},
    {desc, <<"microsecond latency for calls to couch_db:collect_results/3">>}
]}.
{[couchdb, database_writes], [
    {type, counter},
    {desc, <<"number of times a database was changed">>}
]}.
{[couchdb, database_reads], [
    {type, counter},
    {desc, <<"number of times a document was read from a database">>}
]}.
{[couchdb, database_purges], [
    {type, counter},
    {desc, <<"number of times a database was purged">>}
]}.
{[couchdb, db_open_time], [
    {type, histogram},
    {desc, <<"milliseconds required to open a database">>}
]}.
{[couchdb, document_inserts], [
    {type, counter},
    {desc, <<"number of documents inserted">>}
]}.
{[couchdb, document_writes], [
    {type, counter},
    {desc, <<"number of document write operations">>}
]}.
{[couchdb, document_purges, total], [
    {type, counter},
    {desc, <<"number of total document purge operations">>}
]}.
{[couchdb, document_purges, success], [
    {type, counter},
    {desc, <<"number of successful document purge operations">>}
]}.
{[couchdb, document_purges, failure], [
    {type, counter},
    {desc, <<"number of failed document purge operations">>}
]}.
{[couchdb, local_document_writes], [
    {type, counter},
    {desc, <<"number of _local document write operations">>}
]}.
{[couchdb, httpd, bulk_docs], [
    {type, histogram},
    {desc, <<"distribution of the number of docs in _bulk_docs requests">>}
]}.
{[couchdb, httpd, bulk_requests], [
    {type, counter},
    {desc, <<"number of bulk requests">>}
]}.
{[couchdb, httpd, requests], [
    {type, counter},
    {desc, <<"number of HTTP requests">>}
]}.
{[couchdb, httpd, view_timeouts], [
    {type, counter},
    {desc, <<"number of HTTP view timeouts">>}
]}.
{[couchdb, httpd, find_timeouts], [
    {type, counter},
    {desc, <<"number of HTTP find timeouts">>}
]}.
{[couchdb, httpd, explain_timeouts], [
    {type, counter},
    {desc, <<"number of HTTP _explain timeouts">>}
]}.
{[couchdb, httpd, all_docs_timeouts], [
    {type, counter},
    {desc, <<"number of HTTP all_docs timeouts">>}
]}.
{[couchdb, httpd, partition_view_requests], [
    {type, counter},
    {desc, <<"number of partition HTTP view requests">>}
]}.
{[couchdb, httpd, partition_find_requests], [
    {type, counter},
    {desc, <<"number of partition HTTP _find requests">>}
]}.
{[couchdb, httpd, partition_explain_requests], [
    {type, counter},
    {desc, <<"number of partition HTTP _explain requests">>}
]}.
{[couchdb, httpd, partition_all_docs_requests], [
    {type, counter},
    {desc, <<"number of partition HTTP _all_docs requests">>}
]}.
{[couchdb, httpd, partition_view_timeouts], [
    {type, counter},
    {desc, <<"number of partition HTTP view timeouts">>}
]}.
{[couchdb, httpd, partition_find_timeouts], [
    {type, counter},
    {desc, <<"number of partition HTTP find timeouts">>}
]}.
{[couchdb, httpd, partition_explain_timeouts], [
    {type, counter},
    {desc, <<"number of partition HTTP _explain timeouts">>}
]}.
{[couchdb, httpd, partition_all_docs_timeouts], [
    {type, counter},
    {desc, <<"number of partition HTTP all_docs timeouts">>}
]}.
{[couchdb, httpd, temporary_view_reads], [
    {type, counter},
    {desc, <<"number of temporary view reads">>}
]}.
{[couchdb, httpd, view_reads], [
    {type, counter},
    {desc, <<"number of view reads">>}
]}.
{[couchdb, httpd, clients_requesting_changes], [
    {type, counter},
    {desc, <<"number of clients for continuous _changes">>}
]}.
{[couchdb, httpd, purge_requests], [
    {type, counter},
    {desc, <<"number of purge requests">>}
]}.
{[couchdb, httpd_request_methods, 'COPY'], [
    {type, counter},
    {desc, <<"number of HTTP COPY requests">>}
]}.
{[couchdb, httpd_request_methods, 'DELETE'], [
    {type, counter},
    {desc, <<"number of HTTP DELETE requests">>}
]}.
{[couchdb, httpd_request_methods, 'GET'], [
    {type, counter},
    {desc, <<"number of HTTP GET requests">>}
]}.
{[couchdb, httpd_request_methods, 'HEAD'], [
    {type, counter},
    {desc, <<"number of HTTP HEAD requests">>}
]}.
{[couchdb, httpd_request_methods, 'OPTIONS'], [
    {type, counter},
    {desc, <<"number of HTTP OPTIONS requests">>}
]}.
{[couchdb, httpd_request_methods, 'POST'], [
    {type, counter},
    {desc, <<"number of HTTP POST requests">>}
]}.
{[couchdb, httpd_request_methods, 'PUT'], [
    {type, counter},
    {desc, <<"number of HTTP PUT requests">>}
]}.
{[couchdb, httpd_status_codes, 200], [
    {type, counter},
    {desc, <<"number of HTTP 200 OK responses">>}
]}.
{[couchdb, httpd_status_codes, 201], [
    {type, counter},
    {desc, <<"number of HTTP 201 Created responses">>}
]}.
{[couchdb, httpd_status_codes, 202], [
    {type, counter},
    {desc, <<"number of HTTP 202 Accepted responses">>}
]}.
{[couchdb, httpd_status_codes, 204], [
    {type, counter},
    {desc, <<"number of HTTP 204 No Content responses">>}
]}.
{[couchdb, httpd_status_codes, 206], [
    {type, counter},
    {desc, <<"number of HTTP 206 Partial Content">>}
]}.
{[couchdb, httpd_status_codes, 301], [
    {type, counter},
    {desc, <<"number of HTTP 301 Moved Permanently responses">>}
]}.
{[couchdb, httpd_status_codes, 302], [
    {type, counter},
    {desc, <<"number of HTTP 302 Found responses">>}
]}.
{[couchdb, httpd_status_codes, 304], [
    {type, counter},
    {desc, <<"number of HTTP 304 Not Modified responses">>}
]}.
{[couchdb, httpd_status_codes, 400], [
    {type, counter},
    {desc, <<"number of HTTP 400 Bad Request responses">>}
]}.
{[couchdb, httpd_status_codes, 401], [
    {type, counter},
    {desc, <<"number of HTTP 401 Unauthorized responses">>}
]}.
{[couchdb, httpd_status_codes, 403], [
    {type, counter},
    {desc, <<"number of HTTP 403 Forbidden responses">>}
]}.
{[couchdb, httpd_status_codes, 404], [
    {type, counter},
    {desc, <<"number of HTTP 404 Not Found responses">>}
]}.
{[couchdb, httpd_status_codes, 405], [
    {type, counter},
    {desc, <<"number of HTTP 405 Method Not Allowed responses">>}
]}.
{[couchdb, httpd_status_codes, 406], [
    {type, counter},
    {desc, <<"number of HTTP 406 Not Acceptable responses">>}
]}.
{[couchdb, httpd_status_codes, 409], [
    {type, counter},
    {desc, <<"number of HTTP 409 Conflict responses">>}
]}.
{[couchdb, httpd_status_codes, 412], [
    {type, counter},
    {desc, <<"number of HTTP 412 Precondition Failed responses">>}
]}.
{[couchdb, httpd_status_codes, 413], [
    {type, counter},
    {desc, <<"number of HTTP 413 Request Entity Too Long responses">>}
]}.
{[couchdb, httpd_status_codes, 414], [
    {type, counter},
    {desc, <<"number of HTTP 414 Request URI Too Long responses">>}
]}.
{[couchdb, httpd_status_codes, 415], [
    {type, counter},
    {desc, <<"number of HTTP 415 Unsupported Media Type responses">>}
]}.
{[couchdb, httpd_status_codes, 416], [
    {type, counter},
    {desc, <<"number of HTTP 416 Requested Range Not Satisfiable responses">>}
]}.
{[couchdb, httpd_status_codes, 417], [
    {type, counter},
    {desc, <<"number of HTTP 417 Expectation Failed responses">>}
]}.
{[couchdb, httpd_status_codes, 500], [
    {type, counter},
    {desc, <<"number of HTTP 500 Internal Server Error responses">>}
]}.
{[couchdb, httpd_status_codes, 501], [
    {type, counter},
    {desc, <<"number of HTTP 501 Not Implemented responses">>}
]}.
{[couchdb, httpd_status_codes, 503], [
    {type, counter},
    {desc, <<"number of HTTP 503 Service unavailable responses">>}
]}.
{[couchdb, httpd_status_codes, 507], [
    {type, counter},
    {desc, <<"number of HTTP 507 Insufficient Storage responses">>}
]}.
{[couchdb, open_databases], [
    {type, counter},
    {desc,  <<"number of open databases">>}
]}.
{[couchdb, open_os_files], [
    {type, counter},
    {desc, <<"number of file descriptors CouchDB has open">>}
]}.
{[couchdb, password_hashing_fast], [
    {type, counter},
    {desc, <<"number of fast password hashing operations">>}
]}.
{[couchdb, password_hashing_slow], [
    {type, counter},
    {desc, <<"number of slow password hashing operations">>}
]}.
{[couchdb, request_time], [
    {type, histogram},
    {desc, <<"length of a request inside CouchDB without MochiWeb">>}
]}.
{[couchdb, commits], [
    {type, counter},
    {desc, <<"number of commits performed">>}
]}.
{[couchdb, coalesced_updates, interactive], [
    {type, counter},
    {desc, <<"number of coalesced interactive updates">>}
]}.
{[couchdb, coalesced_updates, replicated], [
    {type, counter},
    {desc, <<"number of coalesced replicated updates">>}
]}.
{[couchdb, couch_server, lru_skip], [
    {type, counter},
    {desc, <<"number of couch_server LRU operations skipped">>}
]}.
{[couchdb, query_server, vdu_rejects], [
    {type, counter},
    {desc, <<"number of rejections by validate_doc_update function">>}
]}.
{[couchdb, query_server, vdu_process_time], [
    {type, histogram},
    {desc, <<"duration of validate_doc_update function calls">>}
]}.
{[couchdb, query_server, acquired_processes], [
    {type, counter},
    {desc, <<"number of acquired external processes">>}
]}.
{[couchdb, query_server, process_starts], [
    {type, counter},
    {desc, <<"number of OS process starts">>}
]}.
{[couchdb, query_server, process_exits], [
    {type, counter},
    {desc, <<"number of normal OS process exits">>}
]}.
{[couchdb, query_server, process_error_exits], [
    {type, counter},
    {desc, <<"number of error OS process exits">>}
]}.
{[couchdb, query_server, process_errors], [
    {type, counter},
    {desc, <<"number of OS process errors">>}
]}.
{[couchdb, query_server, process_prompts], [
    {type, counter},
    {desc, <<"number of successful OS process prompts">>}
]}.
{[couchdb, query_server, time, spawn_proc], [
    {type, counter},
    {desc, <<"accumulated number of microseconds spent spawning os query processes">>}
]}.
{[couchdb, query_server, time, map], [
    {type, counter},
    {desc, <<"accumulated number of microseconds spent processing map_doc requests">>}
]}.
{[couchdb, query_server, time, reduce], [
    {type, counter},
    {desc, <<"accumulated number of microseconds spent processing reduce requests">>}
]}.
{[couchdb, query_server, time, reset], [
    {type, counter},
    {desc, <<"accumulated number of microseconds spent processing reset requests">>}
]}.
{[couchdb, query_server, time, add_fun], [
    {type, counter},
    {desc, <<"accumulated number of microseconds spent processing add_fun requests">>}
]}.
{[couchdb, query_server, time, ddoc_new], [
    {type, counter},
    {desc, <<"accumulated number of microseconds spent processing ddoc new requests">>}
]}.
{[couchdb, query_server, time, ddoc_vdu], [
    {type, counter},
    {desc, <<"accumulated number of microseconds spent processing vdu requests">>}
]}.
{[couchdb, query_server, time, ddoc_filter], [
    {type, counter},
    {desc, <<"accumulated number of microseconds spent processing filter requests">>}
]}.
{[couchdb, query_server, time, ddoc_other], [
    {type, counter},
    {desc, <<"accumulated number of microseconds spent processing other ddoc requests">>}
]}.
{[couchdb, query_server, time, other], [
    {type, counter},
    {desc, <<"accumulated number of microseconds spent processing other requests">>}
]}.
{[couchdb, query_server, calls, spawn_proc], [
    {type, counter},
    {desc, <<"number of spawned query processes">>}
]}.
{[couchdb, query_server, calls, map], [
    {type, counter},
    {desc, <<"number of map_doc requests">>}
]}.
{[couchdb, query_server, calls, reduce], [
    {type, counter},
    {desc, <<"number of reduce requests">>}
]}.
{[couchdb, query_server, calls, reset], [
    {type, counter},
    {desc, <<"number of reset requests">>}
]}.
{[couchdb, query_server, calls, add_fun], [
    {type, counter},
    {desc, <<"number of add_fun requests">>}
]}.
{[couchdb, query_server, calls, ddoc_new], [
    {type, counter},
    {desc, <<"number of ddoc new requests">>}
]}.
{[couchdb, query_server, calls, ddoc_vdu], [
    {type, counter},
    {desc, <<"number of vdu requests">>}
]}.
{[couchdb, query_server, calls, ddoc_filter], [
    {type, counter},
    {desc, <<"number of filter requests">>}
]}.
{[couchdb, query_server, calls, ddoc_other], [
    {type, counter},
    {desc, <<"number of other ddoc requests">>}
]}.
{[couchdb, query_server, calls, other], [
    {type, counter},
    {desc, <<"number of other requests">>}
]}.
{[couchdb, legacy_checksums], [
    {type, counter},
    {desc, <<"number of legacy checksums found in couch_file instances">>}
]}.
{[pread, exceed_eof], [
    {type, counter},
    {desc, <<"number of the attempts to read beyond end of db file">>}
]}.
{[pread, exceed_limit], [
    {type, counter},
    {desc, <<"number of the attempts to read beyond set limit">>}
]}.
{[fsync, time], [
    {type, histogram},
    {desc, <<"microseconds to call fsync">>}
]}.
{[fsync, count], [
    {type, counter},
    {desc, <<"number of fsync calls">>}
]}.
{[mango, unindexed_queries], [
    {type, counter},
    {desc, <<"number of mango queries that could not use an index">>}
]}.
{[mango, query_invalid_index], [
    {type, counter},
    {desc, <<"number of mango queries that generated an invalid index warning">>}
]}.
{[mango, too_many_docs_scanned], [
    {type, counter},
    {desc, <<"number of mango queries that generated an index scan warning">>}
]}.
{[mango, keys_examined], [
    {type, counter},
    {desc, <<"number of keys examined by mango queries coordinated by this node">>}
]}.
{[mango, docs_examined], [
    {type, counter},
    {desc, <<"number of documents examined by mango queries coordinated by this node">>}
]}.
{[mango, quorum_docs_examined], [
    {type, counter},
    {desc, <<"number of documents examined by mango queries, using cluster quorum">>}
]}.
{[mango, results_returned], [
    {type, counter},
    {desc, <<"number of rows returned by mango queries">>}
]}.
{[mango, query_time], [
    {type, histogram},
    {desc, <<"length of time processing a mango query">>}
]}.
{[mango, evaluate_selector], [
    {type, counter},
    {desc, <<"number of mango selector evaluations">>}
]}.
