Expand description
Metrics subsystem
§Metrics Module
This module provides a singleton implementation for managing metrics.
Structs§
- Histogram
Timing - Measure execution time and record as a metric.
- Prometheus
Prometheusis a struct that represents a Prometheus exporter server.
Enums§
- Error
- Error returned by metrics subsystem
Constants§
- DEFAULT_
PROMETHEUS_ PORT - Default Prometheus port (29090)
- GAUGE_
CREDIT_ WITHDRAWAL_ LIMIT_ AVAILABLE - Withdrawal daily limit available credits
- GAUGE_
CREDIT_ WITHDRAWAL_ LIMIT_ TOTAL - Total withdrawal daily limit in credits
- LABEL_
ABCI_ RESPONSE_ CODE - Metrics label to specify ABCI response code
- LABEL_
CHECK_ TX_ MODE - Metrics label to specify check tx mode: 0 - first time check, 1 - recheck
- LABEL_
STATE_ TRANSITION_ NAME - Metrics label to specify state transition name
Functions§
- abci_
last_ block_ time - Set time of last block into [COUNTER_LAST_BLOCK_TIME].
- abci_
last_ finalized_ round - Add round of last finalized round to [HISTOGRAM_FINALIZED_ROUND] metric.
- abci_
last_ platform_ height - Sets the last finalized height metric to the provided height value.
- abci_
request_ duration - Returns a
[HistogramTiming]instance for measuring ABCI request duration. - abci_
response_ code_ metric_ label - Create a label for the response code.
- endpoint_
metric_ label - Create a label for the endpoint.
- query_
duration_ metric - Returns a
[HistogramTiming]instance for measuring query duration. - state_
transition_ execution_ histogram - Store a histogram metric for state transition processing duration