Skip to content

Commit 8a72574

Browse files
dabueSaberMaster
authored andcommitted
bugfix(prometheus): the overhead should use milliseconds. apache#1615 (apache#1616)
Fix apache#1615
1 parent 5d39cb5 commit 8a72574

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apisix/plugins/prometheus/exporter.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ function _M.log(conf, ctx)
110110

111111
local overhead = latency
112112
if ctx.var.upstream_response_time then
113-
overhead = overhead - tonumber(ctx.var.upstream_response_time)
113+
overhead = overhead - tonumber(ctx.var.upstream_response_time) * 1000
114114
end
115115
metrics.overhead:observe(overhead,
116116
gen_arr("request", service_id, balancer_ip))

0 commit comments

Comments
 (0)