nic-6443 commented on issue #6301:
URL: https://github.com/apache/apisix/issues/6301#issuecomment-1040086133


   > > I found that I couldn't use the `counter` type when coding, because the 
metrics are directly obtain from nginx, there is no accumulation process, and 
the Prometheus counter type has no `set` method, it can only accumulate the 
count. For this reason, I just introduced a new metric `http_requests_total`, 
which is of type guage.
   > 
   > Can we just record the value and next time after we get the new value, 
let's accumulate the counter with the increments.
   
   I feel that this is complicated and unnecessary, because metric type is only 
as a hint, and does not affect the subsequent data storage and processing, even 
if we use the `guage` type, can still use functions such as `rate` to handle, 
like the metric of the counter type.


-- 
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