Returns true if the provided label name conforms to the legacy validation scheme.
(l: str)
| 92 | |
| 93 | |
| 94 | def _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 | |
| 103 | def _validate_labelnames(cls, labelnames): |