This adds a new method on the console and carbon reporters
that can be used to remove a metric from their records.
This will be used in the following cases:
Metrics on dynamic objects
Control of metrics so that you can turn on and off metrics programatically.
The end goal is to have this as a method on Reporter, but I thought I would
get feedback on carbon and console before implementing the more tricky prometheus
metrics.
I've not refactored much as I'm not so sure of the desired end state.
Looking at the prometheus code it looks like it is going to be interesting to implement
removal as the metrics are stored in an Lrucache with a timestamp as the key. I would have to store
that id with a metric (and have a sender send it back) or change the id to be a
hash of the name rather than a time stamp? That seems like the best plan to me.
This adds a new method on the console and carbon reporters that can be used to remove a metric from their records.
This will be used in the following cases:
The end goal is to have this as a method on Reporter, but I thought I would get feedback on carbon and console before implementing the more tricky prometheus metrics.
I've not refactored much as I'm not so sure of the desired end state.
Looking at the prometheus code it looks like it is going to be interesting to implement removal as the metrics are stored in an Lrucache with a timestamp as the key. I would have to store that id with a metric (and have a sender send it back) or change the id to be a
hash of the name rather than a time stamp? That seems like the best plan to me.