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

Method _metric_init

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

Source from the content-addressed store, hash-verified

536 _reserved_labelnames = ['quantile']
537
538 def _metric_init(self) -> None:
539 self._count = values.ValueClass(self._type, self._name, self._name + '_count', self._labelnames,
540 self._labelvalues, self._documentation)
541 self._sum = values.ValueClass(self._type, self._name, self._name + '_sum', self._labelnames, self._labelvalues, self._documentation)
542 self._created = time.time()
543
544 def observe(self, amount: float) -> None:
545 """Observe the given amount.

Callers

nothing calls this directly

Calls 1

timeMethod · 0.45

Tested by

no test coverage detected