Skip to content

Commit

Permalink
bugfix(prometheus): the overhead should use milliseconds. #1615 (#1616
Browse files Browse the repository at this point in the history
)

Fix #1615
  • Loading branch information
dabue authored May 28, 2020
1 parent f16e25d commit 6cf21d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apisix/plugins/prometheus/exporter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 6cf21d3

Please sign in to comment.