You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Prometheus and Otlp have different conventions and requirements for metric names and labels. Currently, otelcol.exporter.prometheus only does the bare minimum to make names Prometheus compliant (simple normalisation). However, Otel Collector was recently updated to do a full normalisation by default.
Most users will expect the Agent's otelcol.exporter.prometheus component to work in the same way as the Collector's prometheus exporter. Hence it'd be good to bring the behaviour in line with the Collector by doing full normalisation by default and letting the users to opt out of it if they prefer.
In order to resolve this, we need to somehow enable the pkg.translator.prometheus.NormalizeName feature gate. There are two ways to enable it:
Upgrade to a version of the Prometheus translator where the feature gate is in beta (which means it's enabled by default)
Keep using the old version of the translator as we do now, but enable the feature gate in the code. Also we should write tests that will fail once we upgrade the translator so we remember to switch off the gate.
The big question we need to answer is whether this should be configurable. If it's configurable, then the config entry will apply for all instances of otelcol.exporter.prometheus, and potentially also otelcol.receiver.prometheus. The configuration would have to go in the root of the agent config file (like the logging block), or it should be a command line argument.
Either way this would be a breaking change, since at the very least the default behaviour will change.
Also check if this change impacts otelcol.receiver.prometheus.
Use case
The Agent's behaviour will be more in line with the Collector's. At the moment sometimes different pipelines produce different metrics.
The text was updated successfully, but these errors were encountered:
ptodev
changed the title
Support full metric normalisation in otelcol.exporter.prometheus
Support full metric name normalisation in otelcol.exporter.prometheus
Jun 6, 2023
Hi, looks like the Collector is rolling back enabling the gate by default. So it reduces urgency but we should try to support both normalisations in config if possible.
that's fine as long as we align on the standard config - so that we know which metric names to use in the app olly plugin and our recommended dashboards.
Request
Prometheus and Otlp have different conventions and requirements for metric names and labels. Currently, otelcol.exporter.prometheus only does the bare minimum to make names Prometheus compliant (simple normalisation). However, Otel Collector was recently updated to do a full normalisation by default.
Most users will expect the Agent's
otelcol.exporter.prometheus
component to work in the same way as the Collector's prometheus exporter. Hence it'd be good to bring the behaviour in line with the Collector by doing full normalisation by default and letting the users to opt out of it if they prefer.The bits of code which currently do the conversion are the calls to
prometheus.BuildPromCompliantName
here:component/otelcol/exporter/prometheus/internal/convert/convert.go
In order to resolve this, we need to somehow enable the
pkg.translator.prometheus.NormalizeName
feature gate. There are two ways to enable it:The big question we need to answer is whether this should be configurable. If it's configurable, then the config entry will apply for all instances of
otelcol.exporter.prometheus
, and potentially alsootelcol.receiver.prometheus
. The configuration would have to go in the root of the agent config file (like the logging block), or it should be a command line argument.Either way this would be a breaking change, since at the very least the default behaviour will change.
Also check if this change impacts
otelcol.receiver.prometheus
.Use case
The Agent's behaviour will be more in line with the Collector's. At the moment sometimes different pipelines produce different metrics.
The text was updated successfully, but these errors were encountered: