apisix
apisix copied to clipboard
bugfix(prometheus): the `overhead` should use millisecond units, so it needs to be multiplied by 1000
The statistics should use millisecond units, so it needs to be multiplied by 1000.
https://github.com/apache/incubator-apisix/blob/master/apisix/plugins/prometheus/exporter.lua#L113
overhead = overhead - tonumber(ctx.var.upstream_response_time)
overhead = overhead * 1000
I wanna fix it.
overhead already has 1000 multiplied, this should be
overhead = overhead - tonumber(ctx.var.upstream_response_time) * 1000
@JanLi-air many thx, your way is right. I was wrong