MCPcopy Index your code
hub / github.com/prometheus/client_python / _is_observable

Method _is_observable

prometheus_client/metrics.py:67–71  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

65 _reserved_labelnames: Sequence[str] = ()
66
67 def _is_observable(self):
68 # Whether this metric is observable, i.e.
69 # * a metric without label names and values, or
70 # * the child of a labelled metric.
71 return not self._labelnames or (self._labelnames and self._labelvalues)
72
73 def _raise_if_not_observable(self):
74 # Functions that mutate the state of the metric, for example incrementing

Callers 2

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected