ironic.common.metrics_collector module

class ironic.common.metrics_collector.DictCollectionMetricLogger(prefix, delimiter='.')[source]

Bases: MetricLogger

Metric logger that collects internal counters.

COUNTER_TYPE = 'c'
GAUGE_TYPE = 'g'
TIMER_TYPE = 'ms'
get_metrics_data()[source]

Return the metrics collection dictionary.

Returns:

Dictionary containing the keys and values of data stored via the metrics collection hooks. The values themselves are dictionaries which contain a type field, indicating if the statistic is a counter, gauge, or timer. A counter has a count field, a gauge value has a value field, and a ‘timer’ fiend las a ‘count’ and ‘sum’ fields. The multiple fields for for a timer type allows for additional statistics to be implied from the data once collected and compared over time.