Closed moritz89 closed 2 years ago
Hi, thanks for opening the issue. I think documenting that explicitly is a good idea! Happy to review a PR 👍
Hey @j4mie, first of all happy new year and wanted to ask how that pull request is looking like :D https://github.com/dabapps/django-log-request-id/pull/50
Hi @moritz89. The tests are failing on your PR. If you could just revert the changes to the test code (ie only update the documentation) then they should pass.
It would be good if this was accepted. I was just looking at using this and scratching my head over exactly this question.
BTW, the alternative I was looking at is nigma / django-request-id. It has the advantage of documenting how to access the ID :-) On the down side, it looks like an abandoned project, so this project seems like the way to go.
This is now fixed 🎉 see https://github.com/dabapps/django-log-request-id/commit/745618bf40935f2293b113cc7fc37ace1633294f
When integrating the middleware, I first tried to access the request ID in views through the headers array in the request
request.headers["X-Request-ID"]
. It would be helpful if this were documented in the readme instead of having to look at the source code to see that it is saved asrequest.id
.Is this already documented somewhere or should I create a pull request (that also extends the example)?