You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Prometheus中system_runtime_cpu_usage等指标实现位置咨询

关于system_runtime系列指标的实现位置说明
  • 你看到的system_runtime_threadpool_queue_length、system_runtime_cpu_usage这些指标,并非prometheus-net或prometheus-net.AspNetCore仓库中直接编写的自定义指标。
  • 它们是prometheus-net通过采集.NET Runtime内置的EventCounter数据,自动转换为Prometheus格式导出的指标。
  • 具体的采集逻辑在prometheus-net的EventCounterAdapter相关代码中,负责监听.NET Runtime发布的EventCounter事件(比如ThreadPool队列长度、CPU使用率这些运行时原生统计数据),然后将其封装为Prometheus指标格式对外暴露。
  • 这些原生运行时数据由.NET Core Runtime自身提供,prometheus-net仅做了适配转换,所以你不会在prometheus-net仓库里找到这些指标的硬编码实现,而是通过通用的EventCounter适配逻辑生成的。

内容的提问来源于stack exchange,提问作者Samrat Alamgir

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.20 19:19:53