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
Fix custom headers propagation for protocol 1 hybrid messages #6374
Conversation
This pull request fixes 1 alert when merging 14e5a84 into ea37db1 - view on LGTM.com fixed alerts:
|
14e5a84
to
1227012
Compare
This pull request fixes 2 alerts when merging 1227012 into ea37db1 - view on LGTM.com fixed alerts:
|
1227012
to
70ad00e
Compare
This pull request fixes 2 alerts when merging 70ad00e into ea37db1 - view on LGTM.com fixed alerts:
|
Hi @auvipy, thank you very much for taking your time with this PR. What do you think about backporting this fix to 4.x? |
@auvipy I've added it to the 4.5 milestone so you won't forget. |
@auvipy Did you backport this? |
… 1 hybrid messages
The issue referenced was [resolved](celery/celery#6374), but it actually does not apply to the bit of code it's pointing to. Fixes #4649 I tried removing the code referenced by the comment, and it causes the test `tests/contrib/celery/test_integration.py::CeleryDistributedTracingIntegrationTask::test_distributed_tracing_propagation_async` to fail. As far as I can tell from about an hour of investigation, the celery [fix](celery/celery#4356) only affects "hybrid messages" (those that blend protocol 1 and 2 syntax as part of a rolling Celery upgrade), which our test suite doesn't use.
The issue referenced was [resolved](celery/celery#6374), but it actually does not apply to the bit of code it's pointing to. Fixes DataDog#4649 I tried removing the code referenced by the comment, and it causes the test `tests/contrib/celery/test_integration.py::CeleryDistributedTracingIntegrationTask::test_distributed_tracing_propagation_async` to fail. As far as I can tell from about an hour of investigation, the celery [fix](celery/celery#4356) only affects "hybrid messages" (those that blend protocol 1 and 2 syntax as part of a rolling Celery upgrade), which our test suite doesn't use.
Note: Before submitting this pull request, please review our contributing
guidelines.
Description
This is an attempt to fix custom header propagation that broke for us after migration from Celery 3.X to 4.X.
I believe it is the same issue as described in #4875
For the hybrid messages of protocol 1, the
message.headers
are ignored, this PR merges them with the rest of the headers extracted from the body.Request
class - fix(tracing): Fix celery custom headers propagation getsentry/sentry#20996