Remove prometheus labels with high cardinality
This commit is contained in:
parent
c0ed143fbd
commit
6c8647a27d
3 changed files with 8 additions and 27 deletions
|
|
@ -16,13 +16,10 @@ function _M.encode_nginx_stats()
|
|||
return cjson.encode({
|
||||
host = ngx.var.host or "-",
|
||||
status = ngx.var.status or "-",
|
||||
remoteAddr = ngx.var.remote_addr or "-",
|
||||
realIpAddr = ngx.var.realip_remote_addr or "-",
|
||||
remoteUser = ngx.var.remote_user or "-",
|
||||
bytesSent = tonumber(ngx.var.bytes_sent) or -1,
|
||||
protocol = ngx.var.server_protocol or "-",
|
||||
method = ngx.var.request_method or "-",
|
||||
uri = ngx.var.uri or "-",
|
||||
path = ngx.var.location_path or "-",
|
||||
requestLength = tonumber(ngx.var.request_length) or -1,
|
||||
requestTime = tonumber(ngx.var.request_time) or -1,
|
||||
upstreamName = ngx.var.proxy_upstream_name or "-",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue