I would like to log every exception that occurs, (MVC cloudapp), in my table storage.
I followed an official tutorial from Microsoft but it seems like they just complicate things too much. Tutorial can be viewed here: https://azure.microsoft.com/sv-se/documentation/articles/cloud-services-dotnet-diagnostics/#how-to-enable-diagnostics-in-a-worker-role
It just feels like it's too much of a hassle just because Azure diagnostics 1.3 isn't supported by default? There's a faster and easier option in the configure window for web/worker role that let's you enable diagnostics but is that only for 1.0?
I just want to log the exceptions in my storage account so Azure Diagnostics 1.0 should be enough, no?
What I've done:
- Enabled diagnostics in my worker and web role by clicking on the checkbox in the configure window for the web and worker role.
- Specified the storage account credentials.
What I need help with:
No WAD containers are created in my storage account. Are they not supposed to be created after I have enabled and specified the storage account credentials?
Why is it so complicated to enable Azure diagnostics 1.3 compared to 1.0?
What's the difference between worker role diagnostics and web role diagnostics? If I had my app in webrole and caching in worker role.. Is it then logged individually? Do I need to enable them both if I want exception logging for both app and caching?
To answer your questions:
If you're looking for
wad-control-container
, then it won't be created. However you should see containers for IIS Logs, Failed Request Logs and Crash dumps if you have enabled that in your diagnostics configuration.Essentially the diagnostics model has changed. Version 1.0 was plugin model while Version 1.3 is an extension model (It changed from SDK 2.5 when they introduced version 1.2). Whether it is complicated, I think it is debatable. While 1.0 version was rather straight forward and had some capabilities like definining the diagnostics configuration in code, I think 1.3 is a step in right direction. I too felt frustrated with it to begin with but now I am realizing the benefits it offers as I use it more. Some of the benefits that appealed to me are:
Some of the things that I don't like in 1.3:
On-Demand Transfer
functionality. We use this functionality a lot which is now deprecated as it relies on code-based diagnostics changes.AFAIK, there's no difference between the two. It all depends on what diagnostics data you want to collect for each role.
Well, yes and no. Each role get it's own
diagnostics.wadcfgx
file where you define the storage account to store diagnostics data. If you define different storage accounts in each role'swadcfgx
file then the data would go into separate storage account. Even if you keep the same storage account, data will have therole name
androle instance name
so that you can distinguish between different diagnostics data.Yes. You would need to enable them both.