(metric_name)
return METRIC_DOTUNDERSCORE_CLEANUP.sub(".", metric_name).strip("_")
Copy pasted from the backend normalization code.
    Extracted from dogweb/datalayer/metrics/query/metadata.py:normalize_metric_name
    Metrics in metadata.csv need to be formatted this way otherwise, syncing metadata will fail.
    Function not exported as a util, as this is different than AgentCheck.normalize. This function just makes sure
    that whatever is in the metadata.csv is understandable by the backend.
Copy pasted from the backend normalization code.
    Extracted from dogweb/datalayer/metrics/query/metadata.py:normalize_metric_name
    Metrics in metadata.csv need to be formatted this way otherwise, syncing metadata will fail.
    Function not exported as a util, as this is different than AgentCheck.normalize. This function just makes sure
    that whatever is in the metadata.csv is understandable by the backend.
Copy pasted from the backend normalization code . Extracted from dogweb / datalayer / metrics / query / metadata . py : normalize_metric_name Metrics in metadata . csv need to be formatted this way otherwise syncing metadata will fail . Function not exported as a util as this is different than AgentCheck . normalize . This function just makes sure that whatever is in the metadata . csv is understandable by the backend .
def normalize_metric_name(metric_name):
    """Copy pasted from the backend normalization code.
    Extracted from dogweb/datalayer/metrics/query/metadata.py:normalize_metric_name
    Metrics in metadata.csv need to be formatted this way otherwise, syncing metadata will fail.
    Function not exported as a util, as this is different than AgentCheck.normalize. This function just makes sure
    that whatever is in the metadata.csv is understandable by the backend.
    """
    if not isinstance(metric_name, str):
        metric_name = str(metric_name)
    metric_name = METRIC_REPLACEMENT.sub("_", metric_name)
    return METRIC_DOTUNDERSCORE_CLEANUP.sub(".", metric_name).strip("_")
def normalize_metric_name ( metric_name ) : if not isinstance ( metric_name , str ) : metric_name = str ( metric_name ) metric_name = METRIC_REPLACEMENT . sub ( "_" , metric_name ) return METRIC_DOTUNDERSCORE_CLEANUP . sub ( "." , metric_name ) . strip ( "_" )