OTel allows UTF-8 in label names while Prometheus has a much more restrictive set. This is causing friction for users when using Prometheus. In particular, . (dot) is a very common character in OTel and we convert that to _ when converting to Prometheus. For example, service.version becomes service_version.
Until the support is fully implemented, I propose to do the same in Pyroscope – convert . to _ in label names to make interoperability easier. Theoretically, we could replace any disallowed characters, but that leads to ambiguity in certain cases and may confuse users.
We're currently using prometheus data model for labels (including those that are set as pprof tags) for consistency with other products:
Although we can not easily loosen the requirement, I'm not very sure if discarding profiles that violate it is the best strategy.
There is ongoing work on support for UTF-8 labels in Prometheus: https://github.com/prometheus/prometheus/issues/13095:
Until the support is fully implemented, I propose to do the same in Pyroscope – convert
.
to_
in label names to make interoperability easier. Theoretically, we could replace any disallowed characters, but that leads to ambiguity in certain cases and may confuse users.