Remove prometheus labels with high cardinality

This commit is contained in:
Manuel de Brito Fontes 2018-06-25 09:22:28 -04:00 committed by Manuel Alejandro de Brito Fontes
parent c0ed143fbd
commit 6c8647a27d
No known key found for this signature in database
GPG key ID: 786136016A8BA02A
3 changed files with 8 additions and 27 deletions

View file

@ -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 "-",