free / prometheus

The Prometheus monitoring system and time series database.
https://prometheus.io/
Apache License 2.0
48 stars 5 forks source link

promql: replace_rate_funcs: copy original name #5

Closed jgracenin closed 6 years ago

jgracenin commented 6 years ago

Looking over this again -- when replacing the functions in the map, the Name field in the Function struct should also be updated from xrate & friends to rate & friends. Basic queries worked, so I'm not sure how this Name field is used. Regardless, it really should match.

I chose to do this instead of just swapping the Call field since it's possible that other fields in the Function struct between xrate/rate may differ over time. It seems safer to rename the functions without any other fields changing.