DeleteLabelValues removes the metric where the variable labels are the same as those passed in as labels (same order as the VariableLabels in Desc). It returns true if a metric was deleted. It is not an error if the number of label values is not the same as the number of VariableLabels in Desc. How
(lvs ...string)
| 72 | // with a performance overhead (for creating and processing the Labels map). |
| 73 | // See also the CounterVec example. |
| 74 | func (m *MetricVec) DeleteLabelValues(lvs ...string) bool { |
| 75 | lvs = constrainLabelValues(m.desc, lvs, m.curry) |
| 76 | |
| 77 | h, err := m.hashLabelValues(lvs) |
| 78 | if err != nil { |
| 79 | return false |
| 80 | } |
| 81 | |
| 82 | return m.deleteByHashWithLabelValues(h, lvs, m.curry) |
| 83 | } |
| 84 | |
| 85 | // Delete deletes the metric where the variable labels are the same as those |
| 86 | // passed in as labels. It returns true if a metric was deleted. |