Skip to content

OTLP receiver: Translation strategy NoUTF8EscapingWithSuffixes escapes some metric name characters when adding of metric suffixes is enabled #15534

@aknuds1

Description

@aknuds1

What did you do?

The new OTLP receiver translation strategy NoUTF8EscapingWithSuffixes is documented as "preserves all special characters like dots", but instead it does escape certain characters in metric names when adding of metric suffixes is enabled.

What did you expect to see?

I expect that the NoUTF8EscapingWithSuffixes translation strategy corresponds to the model.UTF8Validation name validation scheme, in allowing all valid UTF-8 characters, for both metric and label names.

What did you see instead? Under which circumstances?

Let's say you have an OTel gauge with the name "metric.+name+" and unit "°C". The translation logic, when adding of metric suffixes is enabled, will currently produce the Prometheus metric name "metric.name+°C", while the correct translation should instead be "metric.+name+_°C".

I've tested #15440, but it only partially remedies the above case.

System information

No response

Prometheus version

v0.300.0-237-gb407c2930

Prometheus configuration file

No response

Alertmanager version

No response

Alertmanager configuration file

No response

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions