Remove all labelsets from the metric
(self)
| 253 | |
| 254 | |
| 255 | def clear(self) -> None: |
| 256 | """Remove all labelsets from the metric""" |
| 257 | if 'prometheus_multiproc_dir' in os.environ or 'PROMETHEUS_MULTIPROC_DIR' in os.environ: |
| 258 | warnings.warn( |
| 259 | "Clearing labels has not been implemented in multi-process mode yet", |
| 260 | UserWarning) |
| 261 | with self._lock: |
| 262 | self._metrics = {} |
| 263 | |
| 264 | def _samples(self) -> Iterable[Sample]: |
| 265 | if self._is_parent(): |
no outgoing calls