Reputation: 1209
I've read documents in Azure (https://learn.microsoft.com/en-us/azure/azure-monitor/app/api-custom-events-metrics#debug) But couldn't see how to enable Developer Mode for application insights.
How can I enable Developer Mode in Azure Application Insights for node.js?
Upvotes: 3
Views: 5135
Reputation: 451
Developer Mode in the .NET Application Insights SDK does a couple of things, primarily enabling debug messages and disabling batching of telemetry.
While the Node SDK doesn’t have a single setting that does this, you can get the same behavior by using both of the following settings together:
appInsights.setup(...).setInternalLogging(true, true)
to enable debug messages
appInsights.defaultClient.config.maxBatchSize = 1
to disable batching
For the second command, make sure to replace appInsights.defaultClient
for your own TelemetryClient instance if you've instantiated your own.
Upvotes: 4
Reputation: 30035
As per the source code here:
Then in your code, you should use the code as below:
const appInsights = require("applicationinsights");
appInsights.setup("<instrumentation_key>").setInternalLogging(true, true);
appInsights.start();
Upvotes: 2
Reputation: 127
According to the official doc (https://learn.microsoft.com/en-us/azure/azure-monitor/app/api-custom-events-metrics#debug), currently, Developer Mode for application insights is only supported in C# and Visual Basic
Upvotes: 2