1
votes

Is Azure diagnostics only implemented through code? Windows has the Event Viewer where various types of information can be accessed. ASP.Net websites have a Trace.axd file at the root that can viewed for trace information.

I was thinking that something similar might exist in Azure. However, based on the following url, Azure Diagnostics appears to require a custom code implementation:

https://azure.microsoft.com/en-us/documentation/articles/cloud-services-dotnet-diagnostics/#overview

Is there an easier, more built-in way to access Azure diagnostics like I described for other systems above? Or does a custom Worker role need to be created to capture and process this information?

2

2 Answers

2
votes

Azure Worker Roles have extensive diagnostics that you can configure up.

You get to them via the Role configuration:

Role Configuration

Then, through the various tabs, you can configure up specific types of diagnostics and have them periodically transferred to a Table Storage account for later analysis.

Diagnostics Configuration

You can also enable a transfer of application specific logs, which is handy and something that I use to avoid having to remote into the service to view logs:

Diagnostics Configuration - Log Directories

(here, I transfer all files under the AppRoot\logs folder to a blob container named wad-processor-logs, and do so every minute.)

If you go through the tabs, you will find that you have the ability to extensively monitor quite a bit of detail, including custom Performance Counters.

Finally, you can also connect to your cloud service via the Server Explorer, and dig into the same information:

Server Explorer

Right-click on the instance, and select View Diagnostics Data.

Diagnostics Summary

(a recent deployment, so not much to see)

So, yes, you can get access to Event Logs, IIS Logs and custom application logs without writing custom code. Additionally, you can implement custom code to capture additional Performance Counters and other trace logging if you wish.

1
votes

"Azure diagnostics" is a bit vague since there are a variety of services in Azure, each with potentially different diagnostic experiences. The article you linked to talks about Cloud Services, but are you restricted to using Cloud Services?

Another popular option is Azure App Service, which allows you many more options for capturing logs, including streaming them, etc. Here is an article which goes into more details: https://azure.microsoft.com/en-us/documentation/articles/web-sites-enable-diagnostic-log/