I would like to share with you this new addition to Windows Azure features. It simply allows you to get a ‘live’ traces from your applications deployed to Windows Azure as WebSites.
Although we have done extensive tests to ensure product quality, it is, as of today (12/19/12), released as a Preview feature. We would like you to try it and, most importantly, hear your feedbacks or suggestions.
Diagnostic tracing is one important aspect to help identify and investigate issues. In .NET world, application would generally use System.Diagnostics.Trace to write traces to a file. Similarly in nodejs applications, console.log provides a way to trace to the console. Once these applications get deployed to Windows Azure, one may be able to retrieve those traces as follow.
A ‘live’ tracing is complimenting these by allowing user to view the traces as it happens!
This demo illustrates what you need to as an application writer to do tracing and, eventually, how to get live traces.
$ curl --user yourusername https://yoursite.scm.azurewebsites.net/logstream Enter host password for user 'yourusername': Welcome, you are now connected to log-streaming service.
6. Browse to your site and you will see live stream in action!
Wed Dec 19 2012 14:33:18 GMT-0800 (Pacific Standard Time): request for / Wed Dec 19 2012 14:33:21 GMT-0800 (Pacific Standard Time): request for / Wed Dec 19 2012 14:33:22 GMT-0800 (Pacific Standard Time): request for /
Play around with it by adding more traces and see it live. You can also watch the screen cast by @davidebbo.
The live trace is only available if one enables git publishing for the site and only for nodejs application out of the box. Good news is, for Spring’13 Windows Azure release, it will be available to all sites as well as for .NET application. If you are eager to try the live stream with .NET application, I have written a simple AzureTraceListener . Simple clone and follow its readme instruction.