Normalizes an attribute key to a label/metadata name the way Loki does for OTLP attributes: every character outside [a-zA-Z0-9_] becomes _ (service.name → service_name), and a leading digit gets a _ prefix.
[a-zA-Z0-9_]
_
service.name
service_name
Normalizes an attribute key to a label/metadata name the way Loki does for OTLP attributes: every character outside
[a-zA-Z0-9_]becomes_(service.name→service_name), and a leading digit gets a_prefix.