github.com/hyperledger-gerrit-archive/fabric-ca@v2.0.0-alpha.0.20190916143245-4cd4192f0366+incompatible/docs/source/metrics_reference.rst (about) 1 Metrics Reference 2 ================= 3 4 Prometheus Metrics 5 ------------------ 6 7 The following metrics are currently exported for consumption by Prometheus. 8 9 +-------------------------+-----------+------------------------------------------------------------+--------------------------------------------------------------------------------+ 10 | Name | Type | Description | Labels | 11 +=========================+===========+============================================================+=============+==================================================================+ 12 | api_request_count | counter | Number of requests made to an API | ca_name | | 13 | | | +-------------+------------------------------------------------------------------+ 14 | | | | api_name | example api_names: affiliations/{affiliation}, affiliations, | 15 | | | | | certificates, enroll, reenroll, gencrl, idemix/cri, identities, | 16 | | | | | register, revoke, idemix/credential, identities/{id}. | 17 | | | +-------------+------------------------------------------------------------------+ 18 | | | | status_code | Http status code. | 19 | | | | | https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html | 20 +-------------------------+-----------+------------------------------------------------------------+-------------+------------------------------------------------------------------+ 21 | api_request_duration | histogram | Time taken in seconds for the request to an API to be | ca_name | | 22 | | | completed +-------------+------------------------------------------------------------------+ 23 | | | | api_name | example api_names: affiliations/{affiliation}, affiliations, | 24 | | | | | certificates, enroll, reenroll, gencrl, idemix/cri, identities, | 25 | | | | | register, revoke, idemix/credential, identities/{id}. | 26 | | | +-------------+------------------------------------------------------------------+ 27 | | | | status_code | Http status code. | 28 | | | | | https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html | 29 +-------------------------+-----------+------------------------------------------------------------+-------------+------------------------------------------------------------------+ 30 | db_api_request_count | counter | Number of requests made to a database API | ca_name | | 31 | | | +-------------+------------------------------------------------------------------+ 32 | | | | func_name | | 33 | | | +-------------+------------------------------------------------------------------+ 34 | | | | dbapi_name | example dbapi_names: affiliations/{affiliation}, affiliations, | 35 | | | | | certificates, enroll, reenroll, gencrl, idemix/cri, identities, | 36 | | | | | register, revoke, idemix/credential, identities/{id}. | 37 +-------------------------+-----------+------------------------------------------------------------+-------------+------------------------------------------------------------------+ 38 | db_api_request_duration | histogram | Time taken in seconds for the request to a database API to | ca_name | | 39 | | | be completed +-------------+------------------------------------------------------------------+ 40 | | | | func_name | | 41 | | | +-------------+------------------------------------------------------------------+ 42 | | | | dbapi_name | example dbapi_names: affiliations/{affiliation}, affiliations, | 43 | | | | | certificates, enroll, reenroll, gencrl, idemix/cri, identities, | 44 | | | | | register, revoke, idemix/credential, identities/{id}. | 45 +-------------------------+-----------+------------------------------------------------------------+-------------+------------------------------------------------------------------+ 46 47 48 StatsD Metrics 49 -------------- 50 51 The following metrics are currently emitted for consumption by StatsD. The 52 ``%{variable_name}`` nomenclature represents segments that vary based on 53 context. 54 55 For example, ``%{channel}`` will be replaced with the name of the channel 56 associated with the metric. 57 58 +---------------------------------------------------------------+-----------+------------------------------------------------------------+ 59 | Bucket | Type | Description | 60 +===============================================================+===========+============================================================+ 61 | api_request.count.%{ca_name}.%{api_name}.%{status_code} | counter | Number of requests made to an API | 62 +---------------------------------------------------------------+-----------+------------------------------------------------------------+ 63 | api_request.duration.%{ca_name}.%{api_name}.%{status_code} | histogram | Time taken in seconds for the request to an API to be | 64 | | | completed | 65 +---------------------------------------------------------------+-----------+------------------------------------------------------------+ 66 | db_api_request.count.%{ca_name}.%{func_name}.%{dbapi_name} | counter | Number of requests made to a database API | 67 +---------------------------------------------------------------+-----------+------------------------------------------------------------+ 68 | db_api_request.duration.%{ca_name}.%{func_name}.%{dbapi_name} | histogram | Time taken in seconds for the request to a database API to | 69 | | | be completed | 70 +---------------------------------------------------------------+-----------+------------------------------------------------------------+ 71 72 73 .. Licensed under Creative Commons Attribution 4.0 International License 74 https://creativecommons.org/licenses/by/4.0/