You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by me...@apache.org on 2020/05/28 15:42:10 UTC
[incubator-apisix] branch master updated: bugfix(prometheus): the
`overhead` should use milliseconds. #1615 (#1616)
This is an automated email from the ASF dual-hosted git repository.
membphis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-apisix.git
The following commit(s) were added to refs/heads/master by this push:
new 6cf21d3 bugfix(prometheus): the `overhead` should use milliseconds. #1615 (#1616)
6cf21d3 is described below
commit 6cf21d3c2f0030ef7517c8a18367cfa49c8d130f
Author: dabue <53...@users.noreply.github.com>
AuthorDate: Thu May 28 23:41:59 2020 +0800
bugfix(prometheus): the `overhead` should use milliseconds. #1615 (#1616)
Fix #1615
---
apisix/plugins/prometheus/exporter.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apisix/plugins/prometheus/exporter.lua b/apisix/plugins/prometheus/exporter.lua
index de72910..2c0b6fc 100644
--- a/apisix/plugins/prometheus/exporter.lua
+++ b/apisix/plugins/prometheus/exporter.lua
@@ -110,7 +110,7 @@ function _M.log(conf, ctx)
local overhead = latency
if ctx.var.upstream_response_time then
- overhead = overhead - tonumber(ctx.var.upstream_response_time)
+ overhead = overhead - tonumber(ctx.var.upstream_response_time) * 1000
end
metrics.overhead:observe(overhead,
gen_arr("request", service_id, balancer_ip))