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

Function _is_valid_legacy_labelname

prometheus_client/validation.py:94–100  ·  view source on GitHub ↗

Returns true if the provided label name conforms to the legacy validation scheme.

(l: str)

Source from the content-addressed store, hash-verified

92
93
94def _is_valid_legacy_labelname(l: str) -> bool:
95 """Returns true if the provided label name conforms to the legacy validation scheme."""
96 if len(l) == 0:
97 return False
98 if METRIC_LABEL_NAME_RE.match(l) is None:
99 return False
100 return RESERVED_METRIC_LABEL_NAME_RE.match(l) is None
101
102
103def _validate_labelnames(cls, labelnames):

Callers 1

escape_label_nameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected