Skip to content

Commit eaf6234

Browse files
Merge pull request #257652 from AaronMaxwell/aaronmax-nodejs-tshoot-redirect
Redirecting all tshoot info to dedicated article
2 parents b4a5746 + 5d5b7fb commit eaf6234

File tree

1 file changed

+1
-26
lines changed

1 file changed

+1
-26
lines changed

articles/azure-monitor/app/nodejs.md

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -454,34 +454,9 @@ These properties are client specific, so you can configure `appInsights.defaultC
454454
| correlationIdRetryIntervalMs | The time to wait before retrying to retrieve the ID for cross-component correlation. (Default is `30000`.) |
455455
| 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).)|
456456

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.
473-
474-
process.env.APPLICATIONINSIGHTS_LOG_DESTINATION = "file+console";
475-
process.env.APPLICATIONINSIGHTS_LOGDIR = "C:\\applicationinsights\\logs";
476-
477-
// Application Insights SDK setup....
478-
```
479-
480457
## Troubleshooting
481458

482-
[!INCLUDE [azure-monitor-app-insights-test-connectivity](../../../includes/azure-monitor-app-insights-test-connectivity.md)]
483-
484-
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).
485460

486461
## Next steps
487462

0 commit comments

Comments
 (0)