假设最近2分钟内的 http_server_requests_code_total 的数量如下:

  • code=200,path="/home" 的请求数量为 100
  • code=200,path="/login" 的请求数量为 50
  • code=404,path="/home" 的请求数量为 20
  • code=404,path="/login" 的请求数量为 30

根据 code 维度统计的最近2分钟内的数量如下:

  • code=200 的请求数量为 100 + 50 = 150
  • code=404 的请求数量为 20 + 30 = 50
http_server_requests_code_total是Counter指标包含标签 codepath。以code为维度统计最近2分钟的数量。代入具体数字举例

原文地址: http://www.cveoy.top/t/topic/hO3X 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录