node_exporter icon indicating copy to clipboard operation
node_exporter copied to clipboard

Add translation layer to support breaking metric

Open discordianfish opened this issue 3 years ago • 2 comments

We want to change some metric names, for example #2074, but want to avoid a breaking change before the next major release.

Therefor I suggest to introduce a translation layer that allows us to expose new, breaking metrics while preserving the existing metrics by translating the names. Here is an example to illustrate: https://gist.github.com/discordianfish/4c1760cf0e41c98ba5136e6e55b3e49b

For it to not be a breaking change, I'd suggest exposing the translated metrics on /metrics and the new ones on /metrics/next

discordianfish avatar Nov 16 '21 20:11 discordianfish

@discordianfish Have you had a chance to look into this more? I'm still very much interested in collecting the more detailed network metrics implemented in #2074, but it depends on this issue getting resolved.

BenoitKnecht avatar Jun 02 '22 12:06 BenoitKnecht

It's an interesting idea, but IMO this is mostly unnecessary. You can compose PromQL that handles both old and new names.

I would rather give users more simple flags like --collector.foo.new-format-x that can enable new formats/features.

SuperQ avatar Jun 02 '22 15:06 SuperQ