prometheus / prometheus/client_python
Add support for passing in label kwargs to remove() function
未关闭
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 4.4k
- 派生
- 876
- 平均合并
- 8 天 4 小时
- 30 天内合并 PR
- 1
描述
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!
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 prometheus_client/metrics.py 中所引用的 remove() 函数附近开始,并将其与 labels() 函数进行比较。在保留现有行为的同时,添加通过 label kwargs 进行删除的支持,然后运行相关的项目测试,并确认两种删除方式都能正确运行。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- observability
- Issue 类型
- 功能
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 描述清楚
- 新手友好度
- 35/100