Commit 3d7be03
Andrii Sultanov
prometheus: Add CollectorRegistry.unregister functions
Sources of metrics can sometimes disappear at runtime (a VM being
destroyed, disk being unplugged), and rather than continuing to present
the last value, it is useful to remove them altogether.
Other Prometheus client libraries do implement similar functions as
well, see https://docs.rs/prometheus/latest/prometheus/struct.Registry.html#method.unregister
for example.
Signed-off-by: Andrii Sultanov <andrii.sultanov@cloud.com>1 parent fb4f8b1 commit 3d7be03
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
124 | 127 | | |
125 | 128 | | |
126 | 129 | | |
127 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
128 | 134 | | |
129 | 135 | | |
130 | 136 | | |
| |||
0 commit comments