Skip to content
Unverified Commit f8c83bd5 authored by Roman Borschel's avatar Roman Borschel Committed by GitHub
Browse files

Add support for sourced metrics. (#6895)



* Add support for sourced metrics.

A sourced metric is a metric that obtains its values
from an existing source, rather than the values being
independently recorded. It thus allows collecting
metrics from existing counters or gauges without
having to duplicate them in a dedicated prometheus
counter or gauge (and hence another atomic value).

The first use-case is to feed the bandwidth counters
from libp2p directly into prometheus.

* Tabs, not spaces.

* Tweak bandwidth counter registration.

* Add debug assertion for variable labels and values.

* Document monotonicity requirement for sourced counters.

* CI

* Update client/network/src/service.rs

Co-authored-by: default avatarMax Inden <[email protected]>

Co-authored-by: default avatarMax Inden <[email protected]>
parent 8e1ed7d9
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment