client_python icon indicating copy to clipboard operation
client_python copied to clipboard

Possibility to remove metrics

Open dr-duplo opened this issue 4 years ago • 1 comments

I have a use case where I need to remove certain sub-metrics from a labeled metric. Ideally I could remove a bunch of them with a wildcard filter. The idea is to extend the .remove() method and allow for keyword arguments according to the defined label names as in the .labels(...) method. By not providing certain label names one could apply a wildcard operation.

Also would be happy to make a PR.

dr-duplo avatar Sep 16 '21 15:09 dr-duplo

I think this is an interesting idea, but requires some thought. I am not sure extending the existing remove function with keyword arguments is the way to do this, as I would expect keywords to work the same as if I passed in a list.

Another option might be to have a special token (not a string) that means wildcard for that label?

csmarchbanks avatar Sep 22 '21 23:09 csmarchbanks