ApplicationInsights-node.js icon indicating copy to clipboard operation
ApplicationInsights-node.js copied to clipboard

Changes in bunyan error reporting causes traces loss

Open r0tc opened this issue 2 years ago • 0 comments

Few months ago I encountered problem with bunyan and traces/exceptions reporting #914, thank you for fixing the issue. Now I try to move to recent lib version after the fix, but I'm not able due to changes introduced. Let's consider log like log.error({ err, otherProperty: value }, "Some error message..."); In version 2.1.8 otherProperty will be logged to traces together with error and message. In recent version, the error will be reported as exception but there is no trace of otherProperty neither in exceptions or traces. That's due to returning after identifying the log contains error and reporting it as exception. Can you modify the behavior to also report errors as traces, so in my case I don't lose other important properties? Or add a flag so it can be optionally enabled?

r0tc avatar Jun 08 '22 09:06 r0tc