Removes a counter metric with the given name.
(&mut self, name: &str)
| 108 | |
| 109 | /// Removes a counter metric with the given name. |
| 110 | pub fn remove_counter(&mut self, name: &str) { |
| 111 | if let Some(counter) = self.metric_counters.remove(name) { |
| 112 | self.registry |
| 113 | .unregister(Box::new(counter)) |
| 114 | .expect("Failed to unregister counter"); |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | /// Returns a gauge vec metric with the given name, helper message, and set of label names. |
| 119 | /// |