snok / django-guid

Inject an ID into every log message from a Django request. ASGI compatible, integrates with Sentry, and works with Celery

Home Page:https://django-guid.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pass the GUID of a request to the Celery workers

JonasKs opened this issue · comments

Celery tasks triggered by a request will not have the GUID (Correlation-ID) attached to it. Implement a solution to inject the GUID into the Celery logs.

For Celery tasks that are not triggered by a request, use the task-id instead as a GUID.

In progress by @sondrelg , see #48

Implemented in #50 .

Docs and PyPi version bump will follow soon. Creating a new issue for that.

@rcstanciu & @simkimsia : Django-GUID 3.1.0 now has a CeleryIntegration. :)

@JonasKs Works like a charm :) Thanks for the heads up! Cheers!