【问题标题】:Tracing Celery tasks in Django with AWS X-Ray使用 AWS X-Ray 在 Django 中跟踪 Celery 任务
【发布时间】:2020-08-17 11:12:09
【问题描述】:

我正在尝试从我的 Django 应用程序中的 Celery 任务中获取跟踪。我正在使用 AWS 的 X-Ray。我正在获取正常 HTTP 调用、SQL 数据库查询的跟踪,但不是 Celery 任务或 Redis。已实施任务中的日志语句在 X-Ray 中可用。 在我的AppConfig 实现中,我已经完成了通常的操作:

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")

我应该如何从 Celery 任务和 Redis 中获取跟踪信息?

【问题讨论】:

    标签: python amazon-web-services celery django-celery aws-xray


    【解决方案1】:

    目前 X-Ray SDK 不支持 Celery 和 Redis

    【讨论】:

    • 啊哈!你怎么知道的?
    猜你喜欢
    • 2020-07-08
    • 1970-01-01
    • 2021-06-11
    • 2021-06-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-03-13
    • 1970-01-01
    相关资源
    最近更新 更多