New in V1.7.
The CrossCuttingConcerns project handles cross-cutting concerns like logging and diagnostics, this functionality is used by all the projects in the solution and by both roles, so the code does not belong anywhere else than in a separate project.
class handles all kinds of logging and diagnostics from the Azure server instances to the Azure Table Storage and Blob Storage. By default a lot of logging and diagnostics is enabled, much more than you probably want after you go
live, therefore you should alter your settings in here. Since this class is called "all over the place" we can not the settings in a application configuration file or in the role settings, all settings are therefore hard-coded in the class.
is what enables diagnostics for a Azure role, it is by default called from all the role
This video goes through all of the concepts that the AzureDiagnostics
These are the Azure Tables that are created by the AzureDiagnostics
- WADDiagnosticsInfrastructureLogs is the Azure infrastructure log,
- WADDirectoriesTable contains references to all the file-based logs that are stored in the Azure Blob Storage (the IIS logs),
- WADLogsTable is the diagnostics logs (see System.Diagnostics.Trace for more information about trace logs),
- WADPerformaceCountersTable is the log for your performance counters (by default only the processor percentage is tracked)
- WADWindowsEventLogsTable contains the Windows Application and System logs by default.
By default the AzureDiagnostics
class creates the wad-iis-logfiles
Azure blob container, this blob contains all the IIS logfiles in the W3C Extended Log File Format.
Scheduled transfers is how often you want your logs and diagnostics being uploaded to the Azure Table Storage and Blob Storage.
method sets how often the scheduled transfers should occur. Commenting out a line here will disable the logging or diagnostics of that type. By default all scheduled transfers are set
to 5 minutes.
By default full crash dumps are stored as a blob in the Azure Blob Storage.
Full crashdumps are not available in asp.net roles as the exception is always caught. The only exception here is when the role is starting, as that happens in another non-ASP.NET process
Performance counters are enabled by default by AzureProviders, the counters that are to be tracked is set in the
method, by default only the processor percentage is tracked.
is language specific, so if you run your developer environment in another language OS that an English one you may get into trouble. For a complete list of possible PerformanceCounterConfiguration.CounterSpecifier
values for your OS language run "typeperf.exe /Q" in a console. By default the sample rate is every 15 seconds from the tracked performance counters, you may want to tweak this to get less log entries.
Windows Event logs
By default all Windows events to the Application and System logs are stored in the Azure Table Storage, you can change this in the _AzureDiagnostics.AddEventLoggingFromWindowsEventLog() method. Decide here what Windows event logs you are interested in seeing,
you can also filter out events if you want to. The syntax is <channel>!XPath Query , see
for more information.