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

Method _metric_init

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

Source from the content-addressed store, hash-verified

328 _type = 'counter'
329
330 def _metric_init(self) -> None:
331 self._value = values.ValueClass(self._type, self._name, self._name + '_total', self._labelnames,
332 self._labelvalues, self._documentation)
333 self._created = time.time()
334
335 def inc(self, amount: float = 1, exemplar: Optional[Dict[str, str]] = None) -> None:
336 """Increment counter by the given amount."""

Callers

nothing calls this directly

Calls 1

timeMethod · 0.45

Tested by

no test coverage detected