Tuesday, May 17, 2011 10:40 PMModerator
As the Configuration Service 5.0 is now deployed and browseable for the StockTrader 5.0 deployment, I thought I would post a note on the Service Logs view. The most important of these is not immediately apparent, and that is the exception log page. This allows you to see exception (and trace) information for a service domain/appplication. I use this frequently when debugging, since the stack trace/exception info is displayed for Azure nodes that you cannot easily attach to from a VS debugging session; plus for production apps you want to be capturing exceptions anyway.
For StockTrader 5, exceptions are now written as traces (you can see when debugging in Visual Studio output window), logged to the specific node's application event log, and now optionally logged to a SQL Server or SQL Azure database as well. The database logging is non-intrusive, as done on a background thread and simply aborted if the logging database is not available. On Windows Azure, there exists of course rich diagnostic tracing as well, through the Windows Azure SDK. This writes exception info to a storage account, and there are available tools for viewing this within VS directly, or outside of VS. With Azure, one of the first things *required* for understanding/debugging a live deployed app is being able to capture and view exception information. So Config Service 5.0 adds the option to log this to a SQL Azure database (or SQL Server if on-premise deployment). You can have each service domain use the same logging database (as with currently deployed StockTrader 5.0 on Azure); or have each service domain use its own private database (or not log to a DB at all). You can even have on-premise apps log to a SQL Azure logging database if you do not want to create/manage an on-premise SQL Server logging DB yourself.
One reason I am posting this note is that StockTrader 5.0 will be as much a live deployed application everyone can see as an 'admin', as it is a typical sample app. Since you can login as a demo admin and view all the exception messages for the live deployment, I am going, so to speak, "full-monty" with this. So, for example, if you login to StockTrader 5.0 Web App Config Service right now with ConfigWeb, you will see two exceptions and one warning of significance. Feel free to ask what they are and why they are there, if interested.
Greg Leake, Microsoft
Tuesday, May 17, 2011 11:00 PMModerator
One other quick note: In the Service Map View, NodeMap page, and connection page, if something is amiss, the icon for the element in question will be red. You can mouse-hover over such as item, and the tooltip will display the exception message. The Service Log view mentioned above will have more complete exception info, with line numbers, etc. In general, when looking at the ServiceMap page, hover over each type of icon with mouse, additional info for many types of elements your Service Domain uses (databases, distributed caches, nodes running on, WCF endpoints, etc) will be displayed for these, beyond the base perf stats the Service Map Page also displays. Finally, note that as you navigate ServiceMap page and traverse across connected domains, each domain is autonomous, and hence may be using its own (unique) exception log DB. So, for the on-premise services in the current STockTrader 5.0 deployment, as you 'select' the remote service domain and it becomes the root, all the black buttons, including the service log button, are then operating against that service domain. This is what allows me, for example, to use a mobile device, or any public computer, to drill down into my on-premise (building 40, Redmond) service domains and view any exceptions in their logs (as an admin with admin credentials), even though their logging DB is a private, non-Internet accessible SQL Server database running in the lab.
Greg Leake, Microsoft