client_python icon indicating copy to clipboard operation
client_python copied to clipboard

Add support for passing in label kwargs to remove() function

Open mknapphrt opened this issue 3 years ago • 1 comments

Hello,

Would it be possible/would it get maintainer support to add the ability to pass in kwargs to the remove() function: https://github.com/prometheus/client_python/blob/5a5261dd45d65914b5e3d8225b94d6e0578882f3/prometheus_client/metrics.py#L200

I think it should be pretty simple to do, I think the logic would remain largely the same as the above labels() function from an implementation perspective, but rather than setting a value it just calls del on it.

Thanks!

mknapphrt avatar Jun 17 '22 22:06 mknapphrt

Hello, I would be supportive of this change, as you say it would mirror the labels function nicely.

csmarchbanks avatar Jun 29 '22 14:06 csmarchbanks