evalphobia / logrus_sentry

sentry hook for logrus
MIT License
194 stars 78 forks source link

Add flag SendExceptionType to configuration. #50

Closed krzysztofdrys closed 7 years ago

krzysztofdrys commented 7 years ago

We create most of our errors using pkg/errors. Because of this, most of errors in sentry look like this:

*errors.fundamental Failed to fetch User from the database

The *errors.fundamental is not very informative to us and we would like to remove it. I believe it is added here: https://github.com/evalphobia/logrus_sentry/blob/master/sentry.go#L200 by calling the default raven.Exception constructor: https://github.com/evalphobia/logrus_sentry/blob/master/sentry.go#L200

In my personal opinion, because go errors are not quite like exceptions from other languages, Type: reflect.TypeOf(err).String() will no be very helpful most of the time. At least for us it isn't. :)

Would it be possible to add a flag, which will specify, whether raven.Exeception.Type will be populate? Of course, by default it will be populated, to avoid breaking changes.

I couldn't find another way of achieving what I want. If you know one, please tell me. :)