输出到本地的监控指标采集文件中并发线程数一直为0问题 | Concurrency item in metric log
- Dominant language
- Java
- Stars
- 23.1k
- Forks
- 8.1k
- PR merge metrics
- No merged PRs in 30d
Description
## Issue Description
Type: *bug report* or *feature request*
### Describe what happened (or what feature you want)
想利用输出到本地的监控指标采集文件做指标展示,目前发现该日志文件中concurrency指标数据一直是0。是否有其它好的方式能够获取到实时的资源并发线程数?
### Describe what you expected to happen
我们实时采集了该日志文件暴露prometheus,但是发现并发数的指标数据一直是0
### How to reproduce it (as minimally and precisely as possible)
目前看了指标文件输出本地的代码,MetricTimerListener中指标数据来源是遍历ClusterBuilderSlot中的ClusterNodeMap,通过node,metrics()构造MetricNode指标数据。而node.metrics()方法中会调用rollingCounterInMinute.details()方法构建每秒的实时数据,这里的滑动窗口中的MetricBucket并没有concurrency指标,因此构建MetricNode时concurrency指标一直为0.是否有好的方式能够获取到实时的资源并发数
1.
2.
3.
### Tell us your environment
### Anything else we need to know?
Contributor guide
Research direction
Read the metric path through MetricTimerListener, ClusterBuilderSlot.ClusterNodeMap, node.metrics(), and rollingCounterInMinute.details(), focusing on how MetricBucket data becomes MetricNode output. Compare the concurrency field with the local metric log and Prometheus exposure; done means the exported concurrency metric reflects the real-time resource thread count instead of remaining zero.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, prometheus
- Domain
- observability-sre
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100