-
Notifications
You must be signed in to change notification settings - Fork 513
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not create a span when task is triggered by Celery Beat (#2510)
We create a span for submitting a Celery task for execution (when apply_async() is called). In cases where web frameworks are calling apply_async() this is fine, because the web framework created a transaction where the span is attached. When Celery Beat wakes up and is calling apply_async() this is not good, because there is no transaction and then the span ID of the newly created span will be given to the task as parent_span_id leading to orphaned transactions. So in case apply_async() is called by Celery Beat, we do not create a span for submitting the task for execution.
- Loading branch information
1 parent
5a6b5d4
commit 0c9803a
Showing
2 changed files
with
69 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters