Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/logging/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ module.exports = resource => {
attributes['exception.stacktrace'] = e.stack
attributes['exception.type'] = e.name
// remove stack from message, if present
log.msg = log.msg.replace(e.stack, e.stack.split('\n')[0])
// NOTE: an error should always have a stack, but there was an issue report where it somehow was undefined
log.msg = log.msg.replace(e.stack, e.stack?.split('\n')[0])
}
for (const field of custom_fields) if (field in log) attributes[field] = log[field]
logger.emit({
Expand Down