alibaba/Sentinel

输出到本地的监控指标采集文件中并发线程数一直为0问题 | Concurrency item in metric log

Open

#2,430 opened on 2021年10月28日

GitHub で見る
 (2 comments) (0 reactions) (0 assignees)Java (8,150 forks)batch import
area/metricsgood first issuekind/enhancement

Repository metrics

Stars
 (23,109 stars)
PR merge metrics
 (30d に merged PR はありません)

説明

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?

コントリビューターガイド