polaru opened a new issue, #10289:
URL: https://github.com/apache/apisix/issues/10289

   ### Current Behavior
   
   When querying the default endpoint for metrics `/apisix/prometheus/metrics` 
the `http_requests_total` is labeled as a gauge:
   ```
   # HELP apisix_http_requests_total The total number of client requests since 
APISIX started
   # TYPE apisix_http_requests_total gauge
   ```
   
   I think this metric should be a counter because it doesn't go down, except 
when it gets reset to zero, which is in line with the definition from 
[Prometheus docs](https://prometheus.io/docs/concepts/metric_types/#counter).
   
   ### Expected Behavior
   
   I believe `http_requests_total` should be labeled as `counter` and not 
`gauge`.
   
   ### Error Logs
   
   _No response_
   
   ### Steps to Reproduce
   
   Query the metrics endpoint of a running Apisix instance; in my case this was 
done by:
   ```
   $ k exec -ti apisix-79957c947-blvbq -- curl -v 
http://127.0.0.1:9091/apisix/prometheus/metrics 2>&1 | grep http_requests_total 
   # HELP apisix_http_requests_total The total number of client requests since 
APISIX started
   # TYPE apisix_http_requests_total gauge
   apisix_http_requests_total 11172
   ```
   
   ### Environment
   
   - APISIX version (run `apisix version`): 3.5.0
   - Operating system (run `uname -a`): not relevant
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`): not relevant
   - etcd version, if relevant (run `curl 
http://127.0.0.1:9090/v1/server_info`): not relevant
   - APISIX Dashboard version, if relevant: not relevant
   - Plugin runner version, for issues related to plugin runners: not relevant
   - LuaRocks version, for installation issues (run `luarocks --version`): not 
relevant
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to