evalphobia / logrus_sentry

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

Make it possible to log arbitrary sentry interfaces #29

Open flimzy opened 7 years ago

flimzy commented 7 years ago

Sentry supports a wide range of interfaces, but only a small subset of them are supported directly by this plugin (AFAIK, stacktrace, exception, and HTTP).

I wonder if it would be reasonable to add a new 'magic key' that, when present, would be added to the sentry packet, thus allowing the user to specify arbitrary interface(s) to be passed to sentry.

Example:

log.WithFields(log.Fields{
    "interfaces": []raven.Interface{
        raven.NewHttp(req),
        raven.NewWhatever(...),
    },
}).Info("some message")

This might be a case of "too much rope", so I'm submitting it for discussion.