This PR introduces a set of classes extending Prometheus metrics with additional functionality
The goal is to make the use of Prometheus metrics easier in DipDup, directly integrating them with the
existing _MetricManager class in the dipdup.performance module
The first goal was to be able to transform _MetricManager's attributes into Prometheus metrics with as little changes as possible, that's why we make it possible to perform arithmetic operations between metrics and/or numeric values and retrieve their values easily with the value property for reporting
You can now transform an attributes in _MetricManager into a Prometheus metric or add a new metric by using one of the classes, you can then interact with the metric as if it was a regular numeric value
This PR introduces a set of classes extending Prometheus metrics with additional functionality
The goal is to make the use of Prometheus metrics easier in DipDup, directly integrating them with the existing
_MetricManager
class in thedipdup.performance
moduleThe first goal was to be able to transform
_MetricManager
's attributes into Prometheus metrics with as little changes as possible, that's why we make it possible to perform arithmetic operations between metrics and/or numeric values and retrieve their values easily with thevalue
property for reportingYou can now transform an attributes in
_MetricManager
into a Prometheus metric or add a new metric by using one of the classes, you can then interact with the metric as if it was a regular numeric value