我读过Azure (https://docs.microsoft.com/en-us/azure/azure-monitor/app/api-custom-events-metrics#debug)中的文档,但不知道如何启用开发者模式来洞察应用程序。
如何在Azure Application Insights for node.js中启用开发人员模式?
发布于 2019-03-22 01:09:20
.NET Application Insights SDK中的开发人员模式做了几件事,主要是启用调试消息和禁用遥测批处理。
虽然Node SDK没有单独的设置来实现这一点,但是您可以通过将以下两个设置一起使用来获得相同的行为:
启用调试消息的appInsights.setup(...).setInternalLogging(true, true)
禁用批处理的appInsights.defaultClient.config.maxBatchSize = 1
对于第二个命令,如果您已经实例化了您自己的TelemetryClient实例,请确保将appInsights.defaultClient替换为您自己的实例。
发布于 2019-03-15 21:46:35
根据官方文档(https://docs.microsoft.com/en-us/azure/azure-monitor/app/api-custom-events-metrics#debug),目前只有C#和Visual Basic支持开发者模式下的应用洞察
发布于 2019-03-18 13:19:36
根据源代码here

然后,在您的代码中,您应该使用如下代码:
const appInsights = require("applicationinsights");
appInsights.setup("<instrumentation_key>").setInternalLogging(true, true);
appInsights.start();https://stackoverflow.com/questions/55183717
复制相似问题