zhendongcmss commented on issue #5146:
URL: https://github.com/apache/apisix/issues/5146#issuecomment-927631140


   > Maybe we can add:
   > 
   > ```
   > diff --git apisix/plugins/prometheus/exporter.lua 
apisix/plugins/prometheus/exporter.lua
   > index ea1c4843..4a8ec64e 100644
   > --- apisix/plugins/prometheus/exporter.lua
   > +++ apisix/plugins/prometheus/exporter.lua
   > @@ -153,6 +153,10 @@ 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
   > +        if apisix_latency < 0 then
   > +            ngx.log(ngx.EMERG, "latency now ", ngx.now(), ", start_time: 
", ngx.req.start_time(), ", upstream: ",
   > +                    ctx.var.upstream_response_time)
   > +        end
   >      end
   >      metrics.latency:observe(apisix_latency,
   >          gen_arr("apisix", route_id, service_id, consumer_name, 
balancer_ip))
   > ```
   > 
   > to see each value of the items.
   
   ok, let me try.


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