Search code examples
pythonamazon-web-servicescelerydjango-celeryaws-xray

Tracing Celery tasks in Django with AWS X-Ray


I'm trying to get traces from Celery tasks in my Django application. I'm using X-Ray from AWS. I am getting traces for normal HTTP calls, SQL database queries, but not for Celery tasks or Redis. The log statements in the implemented tasks are available in X-Ray. In my AppConfig implementation I've done the usual:

from aws_xray_sdk.core import patch_all
patch_all()
from aws_xray_sdk.core import xray_recorder
# Need a default segment to avoid issues when running migrations and other management commands
xray_recorder.begin_segment("migrations")

How should I go about it to get traces from Celery tasks and Redis?


Solution

  • At present X-Ray SDK does not support Celery and Redis