Add more detail to metric

This commit is contained in:
Simon Detheridge 2020-02-04 14:03:56 +00:00
parent 8e45a62e32
commit 4102aa0580

View file

@ -142,7 +142,7 @@ if Settings.shutdownDrainTimeWindow?
process.removeAllListeners('uncaughtException')
process.on 'uncaughtException', (error) ->
if ['EPIPE', 'ECONNRESET'].includes(error.code)
Metrics.inc('disconnected_write')
Metrics.inc('disconnected_write', 1, {status: error.code})
return logger.warn err: error, 'attempted to write to disconnected client'
logger.error err: error, 'uncaught exception'
if Settings.errors?.shutdownOnUncaughtError