Making Failed Request Tracing More Approachable

One of my favorite IIS7 features is something we call "FREB", which originally stood for "Failed Request Event Buffering".   We've given it a more friedly name now: 'failed request tracing', but everyone around here still calls it freb.  It is a really awesome feature that essentially allows you to configure IIS to "watch for" certain error coditions and provide you detailed trace information about the request.  This makes it much easier to diagnose failures than in past versions of IIS, especially those hard to repro issues that seem to only happen at 3am when you should be sleeping.  IIS will not only log all of the IIS trace events we've sprinkled through our code, but ASP.NET trace events, and even your own page trace events!  It is one powerful feature.

Do you see requests "slow down" over time, or "hang"?  Simply configure IIS to watch out for requests that exceed a given timeout threshold and you'll get detailed information on everything that happened during the request up to the time limit.  Using that info, you should be able to better pinpoint where the hang-up is happening.

Are you seeing random 401, 404 or Server 500 errors?  IIS is infamous for returning these standard error messages for lots of different reasons.  With IIS7, detailed errors provide much more information to you if you're on localhost, but if you want to know which component returned the error, or what happened in sequence before the error, FREB is the way to do it. 

For more information on how to use FREB, see this article titled Using Failed Request Tracing on IIS.net. 

In Vista, all of the FREB logs are stored, by default, to \inetpub\logs\FailedReqLogFiles\w3svcn where n is the site ID for each site.  In this directory, you'll find an XML log file for each freb log that was generated when a failure rule was met.  You'll also see a freb.xsl file which Jaro, one of our stud developers built early on which makes the trace data much easier to read than in notepad:

Yuck!  who wants to read the trace data in raw XML (full size image)


 

The default XSL view of the freb file which ships in Vista (full size image)

Today Eric - the PM owner for this feature - announced a new XSL that takes consuming this information to the next level.  We brought back our iis.net designer, Kevin Goldman, to help us design an even friendlier XSL.  Here is a screen shot of the new XSL:

The new XSL home page view of FREB log(full size image)

One of the things you'll notice right away with the new XSL is that it segments the information a little more and provides navigation tabs at the top to help you filter the data.  By default, you see the Request Summary tab, which shows basic information about the request, and all error and warning events that were found in the trace log.  This is a great way to zero in on which event may have caught your error.  By clicking on "view trace" you can actually "zoom" in to the entire heirarchy of events that occured - in order - during the request, and see the event you clicked on in context.  Of course, you can also click the +|- links to expand and contract additional details. 

If you click on the "Request Details" tab, you'll get see this view: 

The new Request Details page(full size image)

The request details page - Complete Request Trace (default view) - provides a view of all the events in the log file, in heirarchical order with elapsed time for each event. 

The other "tabs" under Request Details provide additional filters for the FREB file.  For example, if you want to see just events that are associated with ISAPI filter notifications, click on the "Filter Notifications" tab.  If you want to see all events related to modules that were executed in the request, click on "Module Notifications", and you'll see this view:

The new Module Notifications page(full size image)

Eric describes all of the tabs in more detail in his forum post.   

You can download the XSL here and start using it with Vista today!  Please be sure to leave any feedback in the forum thread Eric started, we'd definitely love to hear if you like it, and what is still missing. 

enjoy -

 

Bill

No Comments