Skip to content

[BUG]: Celery "on_error" Task not showing in DataDog Metrics #13788

Open
@clicktravel-antonrand

Description

@clicktravel-antonrand

Tracer Version(s)

2.7.0

Python Version(s)

Python 3.11.12

Pip Version(s)

pip 24.0

Bug Report

Hello,

Given the Reproduction code, I would expect to see a DataDog metric for the on_booking_error Celery task which is ran inside a parent task.

I don't see any metrics for this task though, despite seeing logs in DataDog showing it has ran (though I see metrics for the parent task).

Should DD Trace send metrics for the on_error callback task or do I need to do it manually?

Reproduction Code

tasks = [
    book_item.signature(
        args=[],
        immutable=True,
    )
    for item in booking_items
]

booking_finished_callback = on_booking_finished.s()

all_booking_tasks = chord(tasks)

res = all_booking_tasks(
    booking_finished_callback.on_error(on_booking_error.s())
)

Error Logs

No response

Libraries in Use

celery==5.3.6

Operating System

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions