Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parent_span_id being attached to root celerybeat transactions #1096

Closed
wmak opened this issue Apr 22, 2021 · 3 comments · Fixed by #2510
Closed

parent_span_id being attached to root celerybeat transactions #1096

wmak opened this issue Apr 22, 2021 · 3 comments · Fixed by #2510
Assignees
Labels
Feature: Performance Integration: Celery Triaged Has been looked at recently during old issue triage

Comments

@wmak
Copy link
Member

wmak commented Apr 22, 2021

Environment

How do you use Sentry?
Sentry SaaS (sentry.io)

Which SDK and version?
sentry-python==1.0.0

Steps to Reproduce

https://gist.github.com/wmak/fffab40bdbe5329f2ef8bd0a4ff44659

  1. Repro project attached, a very basic flask app with an endpoint that starts a celery task + a celerybeat that starts the same task
  2. Setup the repro project
  3. Run redis on 6379
  4. Start the celery worker celery -A main.celery worker
  5. Start celery beat celery -A main.celery beat --loglevel=INFO --pidfile=''
  6. Wait for the task to be scheduled

Expected Result

I don't expect for celery tasks started by celerybeat to have the parent_span_id set to a span_id, especially when there isn't a corresponding transaction with that span to make the association, the repro attached here is flask + celerybeat. But also happens with Django + celerybeat

Actual Result

The parent_span_id was set in the trace context, so the transaction appears to be orphaned, when it in fact should be a root event instead
image

@github-actions
Copy link

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@antonpirker
Copy link
Member

Hello @wmak
Thanks for writting in. Sorry this issue slipped through the cracks.
This is a really good point, and I think this is a bug that we should address.

As this bug report is already quite old, could you please verify this with the latest Sentry SDK? Thanks!

@github-actions
Copy link

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@antonpirker antonpirker added this to the Celery Update milestone Mar 21, 2022
@antonpirker antonpirker added the Triaged Has been looked at recently during old issue triage label Sep 25, 2023
@antonpirker antonpirker self-assigned this Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature: Performance Integration: Celery Triaged Has been looked at recently during old issue triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants