opbeat_python icon indicating copy to clipboard operation
opbeat_python copied to clipboard

OpbeatLogMiddleware is unfinished/undocumented

Open beniwohli opened this issue 9 years ago • 2 comments

We need to actually use the request from the threadlocal if it is set

beniwohli avatar Aug 05 '16 08:08 beniwohli

Hey @piquadrat ! I was linked to this from your very helpful support message. In my tests, enabling the middleware seems to have the expected result already. It looks like the request is already passed back to the handler? (https://github.com/opbeat/opbeat_python/blob/3.3.4/opbeat/contrib/django/handlers.py#L34)

Is there another component that is missing?

Geekfish avatar Aug 05 '16 09:08 Geekfish

Ah, right, for logging handlers the request is already grabbed from the threadlocal. For full support, we also need to grab it in DjangoClient.capture.

But great to hear that the current state already fulfils your requirements!

beniwohli avatar Aug 05 '16 11:08 beniwohli