Trace in azure

Every role in a Windows Azure Service has a default implementation for starting the diagnostics. How to read the diagnostics was not directly clear to me.
By dumping the diagnostic logs to your storage service in set intervals they become available to read with a tool like Cloud Storage Studio, but also with Visual Studio 2010. The logs are dumped into a Azure Table and can be queried.trace line in diagnostics table
Below is a small peace of code that dumps the diagnostic logs every 15 seconds:

DiagnosticMonitorConfiguration config = DiagnosticMonitor.GetDefaultInitialConfiguration();
config.Logs.ScheduledTransferPeriod = TimeSpan.FromSeconds(15.0);
DiagnosticMonitor.Start("DiagnosticsConnectionString", config);

About erictummers

My work as a recruited developer changes almost every month. I like challenges and sharing the solutions with others. On my blog I’ll mostly post about my work, but expect an occasional home project, productivity tip and tooling review.
This entry was posted in Development. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s