alibaba / tengine

A distribution of Nginx with some advanced features
https://tengine.taobao.org
BSD 2-Clause "Simplified" License
12.76k stars 2.52k forks source link

ngx_http_reqstat_module 模块无法统计 xquic 入向流量 bytes_in 大小 #1947

Open fbwfbi opened 3 months ago

fbwfbi commented 3 months ago

Ⅰ. Issue Description

ngx_http_reqstat_module 模块无法统计 xquic 入向流量 bytes_in 大小,即 bytes_in 值始终为 0

Ⅱ. Describe what happened

通过在 location 块中配置 req_status_show req_server_status; 指定,即可访问 location 对应的路径来获取 http 相关统计信息,但是每个连接 bytes_in 入向流量的值始终为 0

Ⅲ. Describe what you expected to happen

修复该问题,bytes_in 能准确计数

Ⅳ. How to reproduce it (as minimally and precisely as possible)

  1. 配置统计接口
       location /req_status {
            req_status_show req_server_status;
        }
  2. 通过 curl http://127.0.0.1/req_status 统计接口
  3. 输出的每个连接的信息中, bytes_in 一栏始终为 0

image

Ⅴ. Anything else we need to know?

看了一下代码,bytes_in 对应的是 r->connection->received 的值,而 xquic 模块中有对 c->sent 的计数,而无 c->received 的计数

Ⅵ. Environment: