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

Method __init__

prometheus_client/values.py:60–69  ·  view source on GitHub ↗
(self, typ, metric_name, name, labelnames, labelvalues, help_text, multiprocess_mode='', **kwargs)

Source from the content-addressed store, hash-verified

58 _multiprocess = True
59
60 def __init__(self, typ, metric_name, name, labelnames, labelvalues, help_text, multiprocess_mode='', **kwargs):
61 self._params = typ, metric_name, name, labelnames, labelvalues, help_text, multiprocess_mode
62 # This deprecation warning can go away in a few releases when removing the compatibility
63 if 'prometheus_multiproc_dir' in os.environ and 'PROMETHEUS_MULTIPROC_DIR' not in os.environ:
64 os.environ['PROMETHEUS_MULTIPROC_DIR'] = os.environ['prometheus_multiproc_dir']
65 warnings.warn("prometheus_multiproc_dir variable has been deprecated in favor of the upper case naming PROMETHEUS_MULTIPROC_DIR", DeprecationWarning)
66 with lock:
67 self.__check_for_pid_change()
68 self.__reset()
69 values.append(self)
70
71 def __reset(self):
72 typ, metric_name, name, labelnames, labelvalues, help_text, multiprocess_mode = self._params

Callers

nothing calls this directly

Calls 2

__resetMethod · 0.95

Tested by

no test coverage detected