Azure SDK 2.5 Diagnostics Bugs

While working with Azure SDK 2.5, I noticed a few bugs with the updates to Azure diagnostics. Hopefully I can save you some pain.

Diagnostics settings are only applied if publishing from Visual Studio

Depending on your environment, your methods of deploying your cloud service to Azure may be different. For instance, I tend to use the Package option on my cloud projects and then upload the package through the portal. Some of the diagnostics settings will not be uploaded when you do this with Azure SDK 2.5.

Here's how I know this. If you remote onto a cloud service instance that was deployed from Visual Studio, you will see events coming from Azure Diagnostics:

These events are fairly descriptive and indicate things like your log directories settings. If you deploy your cloud service from the portal, none of these Azure Diagnostics events show up. However, keep in mind if that you upgrade a VS deployed cloud service from the portal, the Azure Diagnostics events will show, but all the actions will be from the VS deployment and will not contain any of the updates you built (very frustating to debug).

So it could be just that the events were not emitted, but if I add an absolute path for a log directory and deploy with VS, the directory will be created on the VM. If I deploy through the portal, the directory is not created.

One big problem with this is that your IIS logs won't be persisted to blob storage like you thought.

Another problem I just ran into is if it takes too long for the VMs to come up due to an issue in the Azure datacenter the diagnostics changes will not be pushed from Visual Studio either. So, if your IIS logs don't show up, redeploy.

Local storage absolute paths have no Azure environment variables

Let's say you wanted to take advantage of the file management capabilities of Azure diagnostics local storage in your log directory. And you would also like to push those logs to blob storage. There are a set of common environment variables available in azure that should allow you to find the local storage directory right?

C:\Resources\Directory\%RoleDeploymentID%.%RoleName%.LocalStorageName

Nope, doesn't work. In Azure SDK 2.4 you could do this in code no problem. But now you have to use an absolute path like C:\Temp and manage the log files yourself to keep from exceeding space limits on the drive and still pushing the logs to blob storage. Also keep in mind that if the folder doesn't already exist, Azure diagnostics will create it but without providing ACLs for the Network Service user so your app won't have access to it.

No remove button for Log Directories

Let's say you want to edit or remove the absolute directory that you've configured in the Log Directories tab. No luck there either. You'll need to edit the diagnostics.wadcfgx directly.

comments powered by Disqus