Description
What did you do?
I'm enabling otlp receiver with following argument
- '--web.enable-otlp-receiver'
and on purpose unset the otlp config field (to leverage default)
# otlp:
# translation_strategy: UnderscoreEscapingWithSuffixes
What did you expect to see?
I still expect the otlp metrics to be translated with underscore as UnderscoreEscapingWithSuffixes should be the default.
What did you see instead? Under which circumstances?
Instead, the default config is not computed, and the strategy is to not translate. Metrics are not translated with underscores.
I think this is due to the fact that the UnmarshalYAML is not called if the field is unset
Lines 1530 to 1562 in d9c0ad1
I see that some defaults are computed on parent structure, and this is what should be done for OTLP config here since the enablement of it is not done inside the structure but via an argument
Lines 379 to 381 in d9c0ad1
System information
No response
Prometheus version
3.4.1
Prometheus configuration file
Alertmanager version
Alertmanager configuration file
Logs