django-planet
May 23, 2020

Adding a Unique Request ID to Each Request in Django

published by clivern
in blog Django | Clivern
original entry Adding a Unique Request ID to Each Request in Django

You can do that in Django using a middleware. The middleware needs to generate a unique request id (e.g. using UUID) and associate that id with the request. First way is to attach that id to the request.META in the middleware. the only problem is that you have to fetch that id from the request […]

The post Adding a Unique Request ID to Each Request in Django first appeared on Clivern.