microsoft / ApplicationInsights-node.js

Microsoft Application Insights SDK for Node.js
MIT License
324 stars 141 forks source link

Add enableLoggerErrorToTrace Flag to Allow Loggers to Report log.error Calls as Traces #1126

Closed JacksonWeber closed 1 year ago

JacksonWeber commented 1 year ago

Resolves #1120 and #978

When configuring the config with client.config.enableLoggerErrorToTrace = true; or if configuring using a JSON file "enableLoggerErrorToTrace" = true Bunyan log.err will be exported as traces preserving information passed by the log.err in the msg field. This also extends to console and winston loggers.