{"categories":[{"label":"Dynamic Content","url":"https://skillfed.io/packages/category/internet-www-http-dynamic-content"}],"enrichment":{"capability":"Attaches a unique request ID to every log message generated during a Django HTTP request, enabling you to trace all logs from a single request across your application.","skillfed_tags":["django-middleware","request-tracing","logging"],"use_cases":["Debugging multi-step request flows in high-traffic applications by searching logs for a single request ID across multiple modules and layers.","Correlating logs from load balancers or proxies that generate their own request IDs with application-level logs.","Building request tracing without a full distributed tracing system by embedding request IDs in application logs.","Auditing user actions by logging all operations tied to a specific request ID.","Monitoring and alerting on specific request patterns by filtering logs by request ID in log aggregation tools."],"what_it_does":"django-log-request-id is a Django middleware and logging filter that generates or extracts a unique identifier for each HTTP request and injects it into every log message produced during that request's lifecycle. The ID is stored in a ContextVar and automatically included in log output, allowing developers to grep or search logs to isolate all messages from a single request\u2014essential for debugging high-traffic applications where logs from many concurrent requests are interleaved.\n\nThe package supports several configuration options: it can use a request ID from an incoming HTTP header (such as X-Request-Id from load balancers or proxies like Heroku), fall back to generating one if the header is missing, add the ID to the HttpRequest object for use in views, and optionally include it in response headers. It can also log all incoming requests with metadata like user ID. Setup requires adding the middleware to Django's MIDDLEWARE list and configuring a logging filter and formatter to include the request_id variable in log output.","worth_installing":"Yes. The package is actively maintained, has no known vulnerabilities, low install friction (one Django dependency), and solves a genuine debugging problem in Django applications. The permissive BSD-3-Clause license poses no barrier. The only caveat is that it relies on ContextVar, which the documentation acknowledges is unconventional for Django but is the only viable approach\u2014verify compatibility with your specific Django version and async usage patterns if applicable."},"id":"django-log-request-id","links":{"html":"https://skillfed.io/packages/django-log-request-id","md":"https://skillfed.io/packages/django-log-request-id.md","pypi":"https://pypi.org/project/django-log-request-id/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-03-12","license_spdx":"BSD-3-Clause","license_treatment":"permissive","name":"django-log-request-id","python_support":"supports_current","summary":"Django middleware and log filter to attach a unique ID to every log message generated as part of a request"},"popularity":{"monthly_downloads":760120,"position":5130,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"2.1.2"}
