mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
Update metrics logging
This commit updates the metrics.lua file in the src/common/core/metrics directory. The changes include: - Replacing the 'date' field with the current system time using os.time() - Updating the 'code' field to 'status' to match the ngx.status value
This commit is contained in:
parent
7b0e986d4a
commit
3dda5b19de
1 changed files with 2 additions and 2 deletions
|
|
@ -50,12 +50,12 @@ function metrics:log()
|
|||
end
|
||||
end
|
||||
local request = {
|
||||
date = self.ctx.bw.local_time,
|
||||
date = os.time(),
|
||||
ip = self.ctx.bw.remote_addr,
|
||||
country = country,
|
||||
method = self.ctx.bw.request_method,
|
||||
url = self.ctx.bw.request_uri,
|
||||
code = ngx.status,
|
||||
status = ngx.status,
|
||||
["user-agent"] = self.ctx.bw.http_user_agent or "",
|
||||
reason = reason,
|
||||
data = data,
|
||||
|
|
|
|||
Loading…
Reference in a new issue