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

Working in a DevOps team is the best thing that happened to me. 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 )

Facebook photo

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

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.