You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/09/28 05:35:06 UTC

[GitHub] [apisix] leslie-tsang opened a new pull request #5150: bugfix: prometheus don't work as expected, change latency to zero whe…

leslie-tsang opened a new pull request #5150:
URL: https://github.com/apache/apisix/pull/5150


   > Ref to #5146 
   
   prometheus don't work as expected, change latency to zero when it's negative.
   
   Signed-off-by: leslie tsang <le...@icloud.com>
   
   ### What this PR does / why we need it:
   <!--- Why is this change required? What problem does it solve? -->
   <!--- If it fixes an open issue, please link to the issue here. -->
   
   ### Pre-submission checklist:
   
   * [ ] Did you explain what problem does this PR solve? Or what new features have been added?
   * [ ] Have you added corresponding test cases?
   * [ ] Have you modified the corresponding document?
   * [ ] Is this PR backward compatible? **If it is not backward compatible, please discuss on the [mailing list](https://github.com/apache/apisix/tree/master#community) first**
   


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on a change in pull request #5150: fix(prometheus): avoid negative latency caused by inconsistent Nginx metrics

Posted by GitBox <gi...@apache.org>.
spacewander commented on a change in pull request #5150:
URL: https://github.com/apache/apisix/pull/5150#discussion_r717377121



##########
File path: apisix/plugins/prometheus/exporter.lua
##########
@@ -153,6 +153,12 @@ function _M.log(conf, ctx)
         metrics.latency:observe(upstream_latency,
             gen_arr("upstream", route_id, service_id, consumer_name, balancer_ip))
         apisix_latency =  apisix_latency - upstream_latency
+
+        -- TODO: bug founded, ref to `https://github.com/apache/apisix/issues/5146`

Review comment:
       ```suggestion
           -- The latency might be negative, as Nginx uses different time measurements in
           -- different metrics. 
           -- See https://github.com/apache/apisix/issues/5146#issuecomment-928919399
   ```




-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander merged pull request #5150: fix(prometheus): avoid negative latency caused by inconsistent Nginx metrics

Posted by GitBox <gi...@apache.org>.
spacewander merged pull request #5150:
URL: https://github.com/apache/apisix/pull/5150


   


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on a change in pull request #5150: fix(prometheus): avoid negative latency caused by inconsistent Nginx metrics

Posted by GitBox <gi...@apache.org>.
spacewander commented on a change in pull request #5150:
URL: https://github.com/apache/apisix/pull/5150#discussion_r717377121



##########
File path: apisix/plugins/prometheus/exporter.lua
##########
@@ -153,6 +153,12 @@ function _M.log(conf, ctx)
         metrics.latency:observe(upstream_latency,
             gen_arr("upstream", route_id, service_id, consumer_name, balancer_ip))
         apisix_latency =  apisix_latency - upstream_latency
+
+        -- TODO: bug founded, ref to `https://github.com/apache/apisix/issues/5146`

Review comment:
       ```suggestion
           -- The latency might be negative, as Nginx uses different time measurements in
           -- different metrics. 
           -- See https://github.com/apache/apisix/issues/5146#issuecomment-928919399
   ```




-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org