%% 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, open_databases], [
    {type, counter},
    {desc,  <<"number of open databases">>}
]}.
{[couchdb, open_os_files], [
    {type, counter},
    {desc, <<"number of file descriptors CouchDB has open">>}
]}.
{[couchdb, request_time], [
    {type, histogram},
    {desc, <<"length of a request inside CouchDB without MochiWeb">>}
]}.
{[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">>}
]}.
{[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">>}
]}.
{[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, 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">>}
]}.
