Removes a counter vec metric with the given name.
(&mut self, name: &str)
| 80 | |
| 81 | /// Removes a counter vec metric with the given name. |
| 82 | pub fn remove_counter_vec(&mut self, name: &str) { |
| 83 | if let Some(counter) = self.metric_counter_vecs.remove(name) { |
| 84 | self.registry |
| 85 | .unregister(Box::new(counter)) |
| 86 | .expect("Failed to unregister counter vec"); |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | /// Returns a counter metric with the given name and helper message that explains what |
| 91 | /// the counter is measuring or tracking. |