Last week, we launched the beta of our cloud-based exception monitoring service for ASP.NET: appfail.
I thought it'd be good to give an overview of what Appfail is and how it came to be -- from my perspective as a .NET developer.
Where did the idea come from?I'm a software development lead at Kiandra IT in Melbourne. We run a lot of complex ASP.NET web applications and we care about quality for our clients.
I have always felt uneasy about the effectiveness of the generally accepted exception monitoring strategy in the .NET dev community:
- Plug in ELMAH (a great exception reporting plugin for .NET)
- Configure it to log exceptions to a database or an email address
- Periodically check the log by scrolling through a very large list of individual exceptions
- Somehow try and figure out which failures are happening the most and which ones really matter
- If there's a particularly bad one happening -- check the logs very regularly in great fear
In a previous life I was a developer at Microsoft. I worked on Windows Vista, Windows 7 and FAST Search. Inside the Windows team we were blessed with the magic of Windows Error Reporting. When our users encountered exceptions, we received detailed information about the error, including stack traces and mini dumps. Not only did this give us detailed information about the failure scenarios -- it gave us a high level picture of which failures occurred most frequently. Combining exception details and occurrence statistics in one place allows you to make better decisions about which failures matter most to fix.
I wanted to bring some of this awesomeness to ASP.NET -- and I wanted to make it as simple as possible for fellow devs to use.
Failure Analytics Made For DevelopersPlug Appfail into your ASP.NET web application and it will report all unhandled exceptions to our cloud service. We designed it to be intuitive -- so it's best explained visually:
Login to the Appfail dashboard to view detailed analytics of the failures in your web application and quickly focus on the failures that matter:
It groups exceptions by type and stack trace -- this grouping is called a failure. See a particular NullReferenceException that you are interested in? Click on the failure name to see analytics for that failure only. When did it start happening? How often has it been occurring?
View the stack trace and exception type:
OK, so this failure has occurred 14 times.
As a developer, you want to discover the conditions that caused this failure. Appfail gives you a summary of each occurrence of this failure, showing the date/time, URL, the logged in user who encountered this failure and both the user's device platform & browser.
You can drill even further, and view the details of a particular occurrence of this failure. This screen provides detailed information, including all query/post values, cookies, server information, variables and more:
As developers we don't want to get an email every time an exception is encountered in our apps.
We made it so that you can define important events that you want to know about. Is there a particular critical URL that should just work? Register to receive a notification when a failure occurs on this URL. Is there a particular failure that worries you (maybe a StackOverflowException)? Register to receive a message when this occurs. Currently Appfail supports email and TXT/SMS notifications. We'd like to add Twitter DM soon.
There's been a trend in the dev community recently toward in-page overlays (think: the stack overflow mini profiler)... and frankly I love it! So I couldn't bear to make Appfail without one :-)
As you browse, the overlay shows the number of exceptions that have been reported for the current URL. Clicking on the overlay expands the firebug-like Appfail panel at the bottom of the page:
If a failure occurred on a request issued by a form POST, Appfail can "replay" the conditions that led to the failure. A replay will automatically highlight the form and fill it with the values that were posted when the failure occurred:
Nuget IntegrationAppfail is supported in ASP.NET WebForms & MVC 1/2/3. It's really easy to plug in:
Install Appfail via Nuget, and then insert your application's Appfail API token into web.config (you get this when you add your application to appfail.net)
Build your app, and away you go!
(there's an extra step for MVC3 with custom errors turned on)
While we're in beta, all accounts are free -- but even once we're out of beta we're committed to always providing a great, free plan for .NET devs. For higher-volume scenarios with a lot of storage and traffic demands, there'll be paid plans.
We ourselves leverage a lot of great free web services out there, and we want to provide the same for other devs.
We've got a lot of great ideas and great plans for Appfail.
That's the basics of Appfail and why it has fulfilled a need for us.
We're keen to get feedback and suggestions -- no matter how critical!
If you want to read more -- check out how we've been using Appfail to fix issues in Appfail.
If you'd like to try Appfail, head over to our site and sign up.
Follow us on twitter at: @appfaildotnet
Sam & Peter
Sam & Peter