Azure Application Insights - Processor as worker

I created a cloud service project with the following roles:

  • One web role.
  • One worker role.

For both roles, I added Azure Application Insights SDK / Nuget pkg. I also added a Status Monitor for both of them, a StartUp task. The two roles indicate different AI resources. For the Worker role, I also added the following three environment variables in the csdef file.

<Environment>
        <Variable name="COR_ENABLE_PROFILING" value="1" />
        <Variable name="COR_PROFILER" value="{324F817A-7420-4E6D-B3C1-143FBED6D855}" />
        <Variable name="MicrosoftInstrumentationEngine_Host" value="{CA487940-57D2-10BF-11B2-A3AD5A13CBC0}" />
</Environment>

      

Issues unlike the Web role, the Worker role does not populate CPU usage / available memory in Application Insights as shown below.

Worker Role Application Insights Resource:

enter image description here

What could be the problem and can I use any GUID in the environment variables shown above?

Also, it seems that for worker roles, we need to always copy the ApplicationInsights.config file to the output directory. However, when I do this, the worker role throws a task exception and continues to restart, which ultimately prevents deployment from happening.

+3


source to share


1 answer


1) To collect the performance counter account in which the worker process (WaWorkerHost.exe) was running in a workgroup must be part of the Performance Monitor user group.

Take a look at the thread below, it explains how to modify the startup task (InstallAgent.ps1) to grant the correct permissions. This is for the web role, so you will need to replace $ user = "Network Service" with the right account in your case.



add Azure Application insight Status Monitor from command line

2) No, you cannot use a GUID for the env variable. It predefined the COM object GUID for the AppInsights profiler.

+1


source







All Articles