Bug 1451288 - Do not force histogram keys to be valid C++ identifiers; r?Dexter
MozReview-Commit-ID: I8gxTgJrWwR
--- a/toolkit/components/telemetry/parse_histograms.py
+++ b/toolkit/components/telemetry/parse_histograms.py
@@ -378,23 +378,16 @@ associated with the histogram. Returns
if len(keys) > MAX_KEY_COUNT:
raise ValueError('Label count for %s exceeds limit of %d' % (name, MAX_KEY_COUNT))
invalid = filter(lambda k: len(k) > MAX_KEY_LENGTH, keys)
if len(invalid) > 0:
raise ValueError('"keys" values for %s are exceeding length "%d": %s' %
(name, MAX_KEY_LENGTH, ', '.join(invalid)))
- # To make it easier to generate C++ identifiers from this etc., we restrict
- # the key strings to a strict pattern.
- invalid = filter(lambda k: not re.match(CPP_IDENTIFIER_PATTERN, k, re.IGNORECASE), keys)
- if len(invalid) > 0:
- raise ValueError('"keys" values for %s are not matching pattern "%s": %s' %
- (name, CPP_IDENTIFIER_PATTERN, ', '.join(invalid)))
-
def check_whitelisted_kind(self, name, definition):
# We don't need to run any of these checks on the server.
if not self._strict_type_checks or whitelists is None:
return
# Disallow "flag" and "count" histograms on desktop, suggest to use
# scalars instead. Allow using these histograms on Android, as we
# don't support scalars there yet.