Search code examples
azureazure-worker-rolesazure-cloud-servicesazure-application-insights

Azure Application Insights for Worker Role


I am setting up Application Insights for a worker role, and the documentation states:

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.

I cannot find a a Windows Service version of the Nuget package.
Does anyone know what it is called (if it exists)?


Solution

  • You would need these nuget packages:

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

    Here https://github.com/Microsoft/ApplicationInsights-Home/tree/master/Samples/AzureEmailService/WorkerRoleB you can find a sample of a project that is set up with documentation.

    be sure to read the chapter: Report Dependencies