1

Up to now we log unhandled exceptions into logfiles.

Handling these logfiles is no fun.

It would be great to store the exceptions in a database.

This would make it more easy to mark exceptions as done by operators.

With my favourite search engine I found sentry. But this looks like a commercial solution.

I think of a light weight self hosting solution.

We use Python and Django to develop our apps.

Any recommendations?

  • 1
    I doubt there are libraries for this as it would depend so much on your application. You could set sys.excepthook to your own function that logs to a database. That only gets uncaught exceptions, so if you have a framework that catches exceptions, you'll have to hook that. It may be worth looking at the WebError library, although what it does is different, you might get some inspiration. – paj28 Aug 23 '14 at 18:27
1

Sentry seems to actually be open source:

https://github.com/getsentry/sentry

What they sell at https://getsentry.com is hosting, but you can also host it for free on your own server.

0

Yes, this kind of tool exists.

Most of them have some advanced features. For example, you can usually store not only exception stack traces or error messages, but can also just write down a problem manually and add it. That makes not much difference, because bugs are not uniform anyway.

With handling of marking exceptions as done, and lots of other related features, like commenting on the problem, we have a typical bug tracker:

As you asked for Python, trac comes to mind.

See Wikipedia on trac for example.

It's a web application that can easily be hosted locally. Licensed similar to the BSD license - that means it is more "free" than most other FOSS software.

There are a lot of other similar systems to choose from of course.


Note that there is one important, hard problem with storing errors automatically: Merging duplicate reports of the same bug - or even the same underlying problem with different symptoms.
That's hard anyway when done manually.

You can filter out exact duplicates of course. But only those. Also, the system will create lots of irrelevant reports, which would never have been even concidered by a human.

It needsd lots of manual work to make sense of that database.


Looking at sentry, I think that is a solution in between log files and a bug tracker.
Someone should file most bugs manually, after ignoring lots of noise. But compared to using log files, that person has very good tools and structured data to use.
Of course there will be some cases where we can really just pipe a stack trace to the REST interface of trac to create a new issue.

I can not easily make up an example for this, though...

  • 1
    Trac is a bug/issue tracker. I want to store uncaught exceptions in a structured way, not in plain text. – guettli Aug 23 '14 at 11:12
  • sentry seems to be a closed source solution. That does not work in my context. – guettli Aug 23 '14 at 11:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.