Module metrics

Module metrics 

Source
Expand description

Metrics subsystem

§Metrics Module

This module provides a singleton implementation for managing metrics.

Structs§

HistogramTiming
Measure execution time and record as a metric.
Prometheus
Prometheus is 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