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

Function _validate_labelnames

prometheus_client/validation.py:103–113  ·  view source on GitHub ↗

Raises ValueError if any of the provided names is not a valid label name. This check uses the global legacy validation setting to determine the validation scheme.

(cls, labelnames)

Source from the content-addressed store, hash-verified

101
102
103def _validate_labelnames(cls, labelnames):
104 """Raises ValueError if any of the provided names is not a valid label name.
105
106 This check uses the global legacy validation setting to determine the validation scheme.
107 """
108 labelnames = tuple(labelnames)
109 for l in labelnames:
110 _validate_labelname(l)
111 if l in cls._reserved_labelnames:
112 raise ValueError('Reserved label methe fric name: ' + l)
113 return labelnames
114
115
116def _validate_exemplar(exemplar):

Callers 1

__init__Method · 0.85

Calls 1

_validate_labelnameFunction · 0.85

Tested by

no test coverage detected