辅助角色的 Azure Application Insights

Azure Application Insights for Worker Role

我正在为辅助角色设置 Application Insights,文档指出:

Add the Application Insights for Web NuGet package. This version of the SDK includes modules that add server context such as role information. For worker roles, use Application Insights for Windows Services.

我找不到 Nuget 包的 Windows 服务版本。
有人知道它叫什么(如果存在的话)吗?

您需要这些 nuget 包:

Microsoft.ApplicationInsights

  Microsoft.ApplicationInsights.Agent.Intercept
  Microsoft.ApplicationInsights.DependencyCollector
  Microsoft.ApplicationInsights.PerfCounterCollector
  Microsoft.ApplicationInsights.TraceListener
  Microsoft.ApplicationInsights.Web
  Microsoft.ApplicationInsights.Web.TelemetryChannel

在这里https://github.com/Microsoft/ApplicationInsights-Home/tree/master/Samples/AzureEmailService/WorkerRoleB你可以找到一个项目的例子,它是用文档设置的。

一定要阅读章节:报告依赖关系

您不需要网络。您需要 Windows Server(不是服务)。 Nuget 包在这里:https://www.nuget.org/packages/Microsoft.ApplicationInsights.WindowsServer/