microsoft / ApplicationInsights-node.js

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

[Feature Request] Support configurable level for console.{level} capture #1128

Open mdmower opened 1 year ago

mdmower commented 1 year ago

When .setAutoCollectConsole(true, true) is used to capture console.error(), console.warn(), etc. messages, it would be terrific if the level (trace, debug, info, warn, error) could be configured. For example, I'd like to capture only warning and error logs.

JacksonWeber commented 4 months ago

@mdmower Console log telemetry collection based on the APPLICATIONINSIGHTS_INSTRUMENTATION_LOGGING_LEVEL environment variable should be possible as of version 3.1.0.