mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Send the status code with the HTTP request size metric
This commit is contained in:
parent
4a92be80ea
commit
62e82d7469
1 changed files with 1 additions and 1 deletions
|
@ -17,7 +17,7 @@ module.exports.monitor = (logger) ->
|
||||||
routePath = req.route.path.toString().replace(/\//g, '_').replace(/\:/g, '').slice(1)
|
routePath = req.route.path.toString().replace(/\//g, '_').replace(/\:/g, '').slice(1)
|
||||||
Metrics.timing("http_request", responseTimeMs, null, {method:req.method, status_code: res.statusCode, path:routePath})
|
Metrics.timing("http_request", responseTimeMs, null, {method:req.method, status_code: res.statusCode, path:routePath})
|
||||||
if requestSize
|
if requestSize
|
||||||
Metrics.summary("http_request_size_bytes", requestSize, {method:req.method, path:routePath})
|
Metrics.summary("http_request_size_bytes", requestSize, {method:req.method, status_code: res.statusCode, path:routePath})
|
||||||
remoteIp = req.ip || req.socket?.socket?.remoteAddress || req.socket?.remoteAddress
|
remoteIp = req.ip || req.socket?.socket?.remoteAddress || req.socket?.remoteAddress
|
||||||
reqUrl = req.originalUrl || req.url
|
reqUrl = req.originalUrl || req.url
|
||||||
referrer = req.headers['referer'] || req.headers['referrer']
|
referrer = req.headers['referer'] || req.headers['referrer']
|
||||||
|
|
Loading…
Reference in a new issue