Skip to content

OTLP receiver: Return to using stdlib for splitting metric name in classical translation mode#15573

Merged
aknuds1 merged 1 commit intoprometheus:mainfrom
aknuds1:arve/separate-otlp-modes
Dec 11, 2024
Merged

OTLP receiver: Return to using stdlib for splitting metric name in classical translation mode#15573
aknuds1 merged 1 commit intoprometheus:mainfrom
aknuds1:arve/separate-otlp-modes

Conversation

@aknuds1
Copy link
Copy Markdown
Contributor

@aknuds1 aknuds1 commented Dec 10, 2024

In the OTLP receiver's non-UTF-8 translation mode (i.e. UnderscoreEscapingWithSuffixes), use strings.FieldsFunc to split string into tokens, to return to how it was before #15258. This makes the code more robust and readable, since there's no need for a custom version of strings.FieldsFunc.

This is preparing for the consensus on #15440.

In non-UTF-8 mode, use strings.FieldsFunc to split string into tokens,
as it was before PR prometheus#15258. This makes the code more robust and
readable.

Signed-off-by: Arve Knudsen <[email protected]>
Copy link
Copy Markdown
Member

@ArthurSens ArthurSens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove the file helpers_from_stdlib.go now that they aren't used?

@aknuds1
Copy link
Copy Markdown
Contributor Author

aknuds1 commented Dec 11, 2024

Can we remove the file helpers_from_stdlib.go now that they aren't used?

We can't yet, since the functions in the file are still used for UTF-8 translation mode (I just stopped using them for the classical translation mode).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants