8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef95c4b commit 92b2397Copy full SHA for 92b2397
prometheus_client/metrics.py
@@ -200,7 +200,8 @@ def remove(self, *labelvalues: Any) -> None:
200
raise ValueError('Incorrect label count (expected %d, got %s)' % (len(self._labelnames), labelvalues))
201
labelvalues = tuple(str(l) for l in labelvalues)
202
with self._lock:
203
- del self._metrics[labelvalues]
+ if labelvalues in self._metrics:
204
+ del self._metrics[labelvalues]
205
206
def clear(self) -> None:
207
"""Remove all labelsets from the metric"""
0 commit comments