Skip to content

otlp/translator: Metrics with words split by multiple UTF8 character lose characters during translation #15362

@ArthurSens

Description

@ArthurSens

Originally posted by @ArthurSens in #15258 (comment)


Due to historical reasons, the translator code was copied from OpenTelemetry collector codebase.
Over there, they tried to provide means to translate metric names following Prometheus conventions that are documented here.

Although not explicitly said, it was implied that words should be separated by a single underscore and the codebase was written with that in mind.

Now that we're allowing OTel users to have their original names stored in prometheus without any transformation, we're facing problems where two (or more) UTF-8 characters are being used to separate words.

A few examples:

  • http______requests_total becomes http_requests_total
  • http...._requests....total becomes http.requests.total

In summary, we want to fix the bug documented in code here

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions