The old raven client integrated with logbook. Is this planned for the new SDK as well?
It's not planned yet but if people are asking for it we will prioritize of course.
I just discovered this as we are migrating from Raven to the new SDK. Going to try to hack something together, might submit a PR if it turns out good.
@nip3o did you migrate Logbook handler from raven to sentry_sdk?
Ohh, I forgot about this. Yes, I ended up copy-pasting https://github.com/getsentry/sentry-python/blob/master/sentry_sdk/integrations/logging.py#L153-L210 but inheriting from logbook.Handler instead of from logging.Handler, and changing some attribute names from record.
It's not very pretty but here's a Gist if you find it useful. https://gist.github.com/nip3o/eb938f898c379cd847cba3af49b69cb7
thank you. It seem like you have implemented raven logic to handle record. I mean you have manually added new event handler to logbook handler's stack.
But logging integration patching logging library. Anyway thank you, i have missed EventHandler when looking to the code.
@nip3o I forked your code to add breadcrumb support: https://gist.github.com/miracle2k/a3eb2350e73ca025eaca84ced48fdabf
Most helpful comment
Ohh, I forgot about this. Yes, I ended up copy-pasting https://github.com/getsentry/sentry-python/blob/master/sentry_sdk/integrations/logging.py#L153-L210 but inheriting from
logbook.Handlerinstead of fromlogging.Handler, and changing some attribute names fromrecord.It's not very pretty but here's a Gist if you find it useful. https://gist.github.com/nip3o/eb938f898c379cd847cba3af49b69cb7