Skip to content

Conversation

ywwg
Copy link
Member

@ywwg ywwg commented Jul 9, 2025

ywwg added a commit to prometheus/prometheus that referenced this pull request Jul 9, 2025
The last permutation of the translation options does underscore translation but does not add suffixes.
This translation option already exists in Mimir as otel_metric_suffixes_enabled, indicating external demand for this strategy.
There is an accompanying update to prometheus-docs to explain the use of this mode: prometheus/docs#2688
ywwg added a commit to prometheus/prometheus that referenced this pull request Jul 9, 2025
The last permutation of the translation options does underscore translation but does not add suffixes.
This translation option already exists in Mimir as otel_metric_suffixes_enabled, indicating external demand for this strategy.
There is an accompanying update to prometheus-docs to explain the use of this mode: prometheus/docs#2688

Signed-off-by: Owen Williams <owen.williams@grafana.com>
…xes translation strategy

Signed-off-by: Owen Williams <owen.williams@grafana.com>
@ywwg ywwg force-pushed the owilliams/translation-strategies branch from 25ea099 to 575d08c Compare July 9, 2025 18:27
@ywwg ywwg marked this pull request as ready for review July 9, 2025 18:35
@ywwg ywwg requested a review from ArthurSens July 9, 2025 18:35
Copy link
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.

Just a nit, but LGTM

Comment on lines 155 to 156
* `NoTranslation`. This strategy bypasses all metric and label name translation, passing them through unaltered. This mode requires UTF-8 to be enabled. Note that without suffixes, it is possible to have collisions when multiple metrics of the same name have different type or units.
* `UnderscoreEscapingWithoutSuffixes`. This fully escapes metric names similar to UnderscoreEscapingWithSuffixes, but does not append type and unit suffixes. This mode is undesirable from a number of standpoints and users should be aware that the lack of suffixes could cause metric name collisions and only enable this mode in concert with careful testing. It is used by some organizations who prefer this balance of Otel symmetry and limited character support.
Copy link
Member

Choose a reason for hiding this comment

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

Could "NoTranslation" be the last one? I can't explain why, but that order feels weird 😛

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah I can keep the order the same as it has appeared elsewhere

ywwg added a commit to prometheus/prometheus that referenced this pull request Jul 10, 2025
…16849)

The last permutation of the translation options does underscore translation but does not add suffixes.
This translation option already exists in Mimir as otel_metric_suffixes_enabled, indicating external demand for this strategy.
There is an accompanying update to prometheus-docs to explain the use of this mode: prometheus/docs#2688

Signed-off-by: Owen Williams <owen.williams@grafana.com>
Signed-off-by: Owen Williams <owen.williams@grafana.com>
@ywwg ywwg requested a review from ArthurSens July 10, 2025 15:28
@ywwg ywwg merged commit 1c2dc97 into main Jul 11, 2025
5 checks passed
@ywwg ywwg deleted the owilliams/translation-strategies branch July 11, 2025 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants