elastic / elastic/apm-agent-python
metrics.base_metrics.Counter API
- 主要语言
- Python
- 星标
- 431
- 派生
- 239
- 平均合并
- 5 天 10 小时
- 30 天内合并 PR
- 7
描述
Is Counter meant to guarantee monotonically increasing values? It doesn't at the moment, since there's both a `dec` method and an `inc` method that accepts negative values.
What's the reason behind not providing a direct value setter? Even if we require the value to be monotonically increasing, you could for example check the current value and raise an exception if the new value is less. If there were a setter, then the `GarbageMetrics.collect` method in https://github.com/elastic/apm-agent-python/pull/481 could be simplified.
贡献指南
调研方向
从 metrics.base_metrics.Counter API 开始,检查 pull request 481 中引用的 GarbageMetrics.collect 方法。确定 Counter 是否应在存在 dec 和负数 inc 的情况下仍保证值单调递增,以及是否需要直接 setter;只有在就预期的 API 行为达成一致并作出明确规范后,该 issue 才算完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- observability-sre
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100