mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
removed metrics from http logging but added key in
having the key in there means its easy to analyise the logs based on the route
This commit is contained in:
parent
f3314437ab
commit
3b1cc6e500
1 changed files with 1 additions and 1 deletions
|
@ -13,11 +13,11 @@ module.exports.logger = (req, res, next) ->
|
||||||
|
|
||||||
processName = if settings.internal.web.name? then "web-#{settings.internal.web.name}" else "web"
|
processName = if settings.internal.web.name? then "web-#{settings.internal.web.name}" else "web"
|
||||||
key = "#{os.hostname()}.#{processName}.#{routePath}".toLowerCase().trim()
|
key = "#{os.hostname()}.#{processName}.#{routePath}".toLowerCase().trim()
|
||||||
metrics.timing(key, responseTime, 0.2)
|
|
||||||
logger.log
|
logger.log
|
||||||
req:
|
req:
|
||||||
url: req.originalUrl || req.url
|
url: req.originalUrl || req.url
|
||||||
method: req.method
|
method: req.method
|
||||||
|
key:key
|
||||||
referrer: req.headers['referer'] || req.headers['referrer']
|
referrer: req.headers['referer'] || req.headers['referrer']
|
||||||
"remote-addr": req.ip || req.socket?.socket?.remoteAddress || req.socket?.remoteAddress
|
"remote-addr": req.ip || req.socket?.socket?.remoteAddress || req.socket?.remoteAddress
|
||||||
"user-agent": req.headers["user-agent"]
|
"user-agent": req.headers["user-agent"]
|
||||||
|
|
Loading…
Reference in a new issue