MCPcopy Create free account
hub / github.com/prometheus/client_python / unregister

Method unregister

prometheus_client/registry.py:52–57  ·  view source on GitHub ↗

Remove a collector from the registry.

(self, collector: Collector)

Source from the content-addressed store, hash-verified

50 self._collectors_without_names.append(collector)
51
52 def unregister(self, collector: Collector) -> None:
53 """Remove a collector from the registry."""
54 with self._lock:
55 for name in self._collector_to_names[collector]:
56 del self._names_to_collectors[name]
57 del self._collector_to_names[collector]
58
59 def _get_names(self, collector):
60 """Get names of timeseries the collector produces and clashes with."""

Calls

no outgoing calls

Tested by 2

test_unregister_worksMethod · 0.76