bugfix(prometheus): the overhead should use milliseconds. #1615 (#1616)

Fix #1615
This commit is contained in:
dabue 2020-05-28 23:41:59 +08:00 committed by GitHub
parent f16e25d484
commit 6cf21d3c2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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