I am implementing the new python sentry SDK (we were using the raven one).
We are using Django Rest Framework (DRF)
I have this simple piece of code
with push_scope() as scope:
For the sake of testing, I copied/pasted this code into two places. In a custom Django Command and into a retrieve function of a view.
I’m using a before_send hook to customize stuff.
When the hook is called, only in the context of the view, my ‘extra_stuff’ does not exist anymore into event.extra. In the context of the command, it is still there.
There is that line:
event = Serializer().serialize_event(event)
that remove the extras that I added. Lots of stuff happen into serialize_event().
Do you have any idea what could happen ? I am confused.
Thank you very much for your time.