getsentry / raven-python

Raven is the legacy Python client for Sentry (getsentry.com) — replaced by sentry-python
https://sentry.io
BSD 3-Clause "New" or "Revised" License
1.68k stars 657 forks source link

Sanic/Flask client consolidation #1220

Open youcandanch opened 6 years ago

youcandanch commented 6 years ago

As noted in #1205 and #1219, a Sanic client was added; it shares a lot of similarities with the existing Flask client, and I had considered refactoring the two to try to lift out some of the common functionality. I didn't want to do this without talking it down a bit first, as I had some concerns:

I'm happy to chunk this out into separate issues if that makes more sense.

(attn: @mitsuhiko)

mitsuhiko commented 6 years ago

So the general trend we're thinking of is to split the basic client from integrations entirely. Our experiments with this are currently limited to the JavaScript clients but based on our experience there we might want to do similar things with raven python. This would most likely mean that the actual integrations become significantly smaller because all they do is hook exception handlers and other things and are completely separated from the clients.

youcandanch commented 6 years ago

Interesting. Is there code somewhere that I can look to for a pattern? I'm happy to do the legwork and sketch this out if I've got references.

ashwoods commented 6 years ago

I've been working on several "proof of concept", and have been hacking on a python 3 only, new rewrite. Currently in a very deep rabbit hole. More or less a complete API rewrite but I think it's pretty solid. But it's still far away from usable. Some code will be ported, but I don't want to put in code who nobody understands why it's there but on the other hand might be important.

youcandanch commented 6 years ago

@ashwoods that's awesome. Lemme know if I can help out at all. Happy to do the needful.

untitaker commented 5 years ago

This is implemented in https://github.com/getsentry/sentry-python: Most common functionality is in the base client. There's not a lot of potential for code sharing left.