You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-monitor/app/nodejs.md
+1-26Lines changed: 1 addition & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -454,34 +454,9 @@ These properties are client specific, so you can configure `appInsights.defaultC
454
454
| correlationIdRetryIntervalMs | The time to wait before retrying to retrieve the ID for cross-component correlation. (Default is `30000`.) |
455
455
| correlationHeaderExcludedDomains| A list of domains to exclude from cross-component correlation header injection. (Default. See [Config.ts](https://github.com/Microsoft/ApplicationInsights-node.js/blob/develop/Library/Config.ts).)|
456
456
457
-
## How do I customize logs collection?
458
-
459
-
By default, Application Insights Node.js SDK logs at warning level to console.
460
-
461
-
To spot and diagnose issues with Application Insights, "Self-diagnostics" can be enabled. This means collection of internal logging from the Application Insights Node.js SDK.
462
-
463
-
The following code demonstrates how to enable debug logging as well as generate telemetry for internal logs.
464
-
465
-
```
466
-
let appInsights = require("applicationinsights");
467
-
appInsights.setup("<YOUR_CONNECTION_STRING>")
468
-
.setInternalLogging(true, true) // Enable both debug and warning logging
469
-
.setAutoCollectConsole(true, true) // Generate Trace telemetry for winston/bunyan and console logs
470
-
.start();
471
-
472
-
Logs could be put into local file using APPLICATIONINSIGHTS_LOG_DESTINATION environment variable, supported values are file and file+console, a file named applicationinsights.log will be generated on tmp folder by default, including all logs, /tmp for *nix and USERDIR\\AppData\\Local\\Temp for Windows. Log directory could be configured using APPLICATIONINSIGHTS_LOGDIR environment variable.
For more information, see [Troubleshoot Application Insights monitoring of Node.js apps and services](/troubleshoot/azure/azure-monitor/app-insights/troubleshoot-app-insights-nodejs).
459
+
For troubleshooting information, including "no data" scenarios and customizing logs, see [Troubleshoot Application Insights monitoring of Node.js apps and services](/troubleshoot/azure/azure-monitor/app-insights/troubleshoot-app-insights-nodejs).
0 commit comments