[Prometheus] Exporter should support 'NoTranslation' mode #6668
Labels
enhancement
New feature or request
pkg:exporter:prometheus
Related to the Prometheus exporter package
Problem Statement
Currently the only way to control escaping in the prometheusexporter is to set common/model.NameValidationScheme. This value is deprecated and shouldn't be used this way.
Proposed Solution
We should unify the configuration options with the consensus solutions being implemented in Prometheus and Otel-Collector: Supporting an explicit "NoTranslation" mode that exposes unescaped metrics on the Prometheus endpoint.
The consensus solution involves two booleans and three possible settings:
The current consensus is not to support NoTranslation + EnableSuffixes. If there is demand for this mode, for instance to prevent metric name collisions, we can add it.
Alternatives
Other methods could be used to control the chosen escaping scheme, like a library global variable, but that's a poor way to control behavior.
Prior Art
OtelCollectorConbtrib's prometheusexporter and prometheusremotewriteexporter are both moving towards config values. Prometheus' otel endpoint similarly will have config-controlled settings.
The text was updated successfully, but these errors were encountered: