1. dcramer

    Sentry, our Django Error Tracker

    Posted on September 24, 2010 by dcramer

    One of the many challenges we face with a large web application is error tracking. We want to know when an error occurs on any of our servers, and we want to know the context and location of the error in our code. To help track and log these errors, we use Redmine and django-db-log internally. They work fairly well, and we’ve been actively improving them as we needed more features.

    Around three weeks ago, we decided to build something for DjangoCon. Disqus doesn’t have a lot of projects that are open sourced yet, but we wanted to get our foot in the door. After wracking our brains for a while, we decided that django-db-log was a good candidate for a refactor and redesign.

    Our initial goal was a simple dashboard panel showing the errors in a more usable order. Errors were naively sorted by date in django-db-log, which meant that they tended to get lost in the list. We wanted to sort the error list in a smarter way that highlighted those errors that were occurring most often in recent history.

    Sentry is a log tracking application built with Django. Though we’ve generalized it to handle any kind of logging, we’re going to use error tracking as the primary example.

    Sentry aggregates errors based on the erring function (typically your view), and gives interactive debugging similar to the debugging in a development environment. We have many more ideas that we want to include, but a few things were important to us from the beginning:

    1. Intelligently grouping error messages.
    2. Identifying erring servers, functions, and URLs.
    3. Streaming errors to the list as they happen without a manual refresh.

      What we came up with is a clean and straightforward interface for diving into message logs. But instead of talking through the UI, we’re just going to show you a video demo. A few things to take note during the video:

      * The error list is updated in real time.
      * Message resolution will automatically relist resolved errors if they continue to happen.
      * The IP Address search is a custom filter (still a work in progress)

        Check out the video, fork us on GitHub, and let us know what you think by leaving a comment.

      • We welcome relevant, respectful comments. Please read our Community Guidelines before commenting.

        blog comments powered by Disqus