I have created a Cloud Service project with following roles:
- One Web role
- One Worker role
For both the roles, I have added Azure Application Insights SDK/ Nuget pkg. I have also added the Status Monitor to both of them, StartUp task. Two roles point to different AI resources. For Worker role I also added the below three environment variables in 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>
The problems is unlike Web role, Worker role doesn't populate the CPU usage/Available memory in Application Insights, as can be shown below.
Application Insights resource of Worker Role:
What can be the issue and can I use any GUID in the environment variables shown above?
Also, it seems that for worker roles we need to set the ApplicationInsights.config file to be copied always to the output directory. However, when I do that, worker role throws the task exception and keeps on restarting, which finally fails the deployment.