Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
logger.forEach(function (entry) {
if ((entry.data) && (typeof entry.data.msec === 'number')) { params.request.duration = entry.data.msec }
})
if ((newrelic) && (request.response._error)) {
flattened = {}
underscore.keys(params).forEach(param => {
underscore.keys(params[param]).forEach(key => {
if ((param === 'error') && ((key === 'message') || (key === 'payload') || (key === 'stack'))) return
flattened[param + '.' + key] = params[param][key]
})
})
flattened.url = flattened['request.pathname']
delete flattened['request.pathname']
newrelic.noticeError(request.response._error, flattened)
}
debug('end', { sdebug: params })
})
logger.forEach((entry) => {
if ((entry.data) && (typeof entry.data.msec === 'number')) { params.request.duration = entry.data.msec }
})
if ((newrelic) && (request.response._error)) {
flattened = {}
underscore.keys(params).forEach(param => {
underscore.keys(params[param]).forEach(key => {
if ((param === 'error') && ((key === 'message') || (key === 'payload') || (key === 'stack'))) return
flattened[param + '.' + key] = params[param][key]
})
})
flattened.url = flattened['request.pathname']
delete flattened['request.pathname']
newrelic.noticeError(request.response._error, flattened)
}
debug('end', { sdebug: params })
})
}
logger.forEach((entry) => {
if ((entry.data) && (typeof entry.data.msec === 'number')) { params.request.duration = entry.data.msec }
})
if ((newrelic) && (request.response._error)) {
flattened = {}
underscore.keys(params).forEach(param => {
underscore.keys(params[param]).forEach(key => {
if ((param === 'error') && ((key === 'message') || (key === 'payload') || (key === 'stack'))) return
flattened[param + '.' + key] = params[param][key]
})
})
flattened.url = flattened['request.pathname']
delete flattened['request.pathname']
newrelic.noticeError(request.response._error, flattened)
}
debug('end', { sdebug: params })
})
})
}
logger.forEach((entry) => {
if ((entry.data) && (typeof entry.data.msec === 'number')) { params.request.duration = entry.data.msec }
})
if ((runtime.newrelic) && (request.response._error)) {
underscore.keys(params).forEach(param => {
underscore.keys(params[param]).forEach(key => {
if ((param === 'error') && ((key === 'message') || (key === 'payload') || (key === 'stack'))) return
flattened[param + '.' + key] = params[param][key]
})
})
flattened.url = flattened['request.pathname']
delete flattened['request.pathname']
runtime.newrelic.noticeError(request.response._error, flattened)
}
debug('end', { sdebug: params })
})
logger.forEach((entry) => {
if ((entry.data) && (typeof entry.data.msec === 'number')) { params.request.duration = entry.data.msec }
})
if ((newrelic) && (request.response._error)) {
flattened = {}
underscore.keys(params).forEach(param => {
underscore.keys(params[param]).forEach(key => {
if ((param === 'error') && ((key === 'message') || (key === 'payload') || (key === 'stack'))) return
flattened[param + '.' + key] = params[param][key]
})
})
flattened.url = flattened['request.pathname']
delete flattened['request.pathname']
newrelic.noticeError(request.response._error, flattened)
}
debug('end', { sdebug: params })
})
}
logger.forEach((entry) => {
if ((entry.data) && (typeof entry.data.msec === 'number')) { params.request.duration = entry.data.msec }
})
if ((runtime.newrelic) && (request.response._error)) {
underscore.keys(params).forEach(param => {
underscore.keys(params[param]).forEach(key => {
if ((param === 'error') && ((key === 'message') || (key === 'payload') || (key === 'stack'))) return
flattened[param + '.' + key] = params[param][key]
})
})
flattened.url = flattened['request.pathname']
delete flattened['request.pathname']
runtime.newrelic.noticeError(request.response._error, flattened)
}
debug('end', { sdebug: params })
})
}
logger.forEach((entry) => {
if ((entry.data) && (typeof entry.data.msec === 'number')) { params.request.duration = entry.data.msec }
})
if ((newrelic) && (request.response._error)) {
flattened = {}
underscore.keys(params).forEach(param => {
underscore.keys(params[param]).forEach(key => {
if ((param === 'error') && ((key === 'message') || (key === 'payload') || (key === 'stack'))) return
flattened[param + '.' + key] = params[param][key]
})
})
flattened.url = flattened['request.pathname']
delete flattened['request.pathname']
newrelic.noticeError(request.response._error, flattened)
}
debug('end', { sdebug: params })
})
}
logger.forEach(function (entry) {
if ((entry.data) && (typeof entry.data.msec === 'number')) { params.request.duration = entry.data.msec }
})
if ((newrelic) && (request.response._error)) {
flattened = {}
underscore.keys(params).forEach(param => {
underscore.keys(params[param]).forEach(key => {
if ((param === 'error') && ((key === 'message') || (key === 'payload') || (key === 'stack'))) return
flattened[param + '.' + key] = params[param][key]
})
})
flattened.url = flattened['request.pathname']
delete flattened['request.pathname']
newrelic.noticeError(request.response._error, flattened)
}
debug('end', { sdebug: params })
})