You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dive into the code, I found the baggage has been extracted.
Try to modify the code
Base on clue1 and clue2, I try to modify opentelemetry.instrumentation.celery.__init__.CeleryInstrumentor._trace_prerun function and this is what I do:
homholueng
changed the title
Celery instrument didn't attach to context which extract from task.request
Celery instrument didn't propagate baggage
Oct 31, 2021
Describe your environment
Darwin-20.3.0-x86_64-i386-64bit
Python 3.6.7
Steps to reproduce
Code Sample:
celery -A my_tasks worker
python my_tasks.py
What is the expected behavior?
The worker should output:
What is the actual behavior?
The actual worker output:
Additional context
Clue1
baggage
header are present in rabbitmq message:Clue2
Dive into the code, I found the baggage has been extracted.
Try to modify the code
Base on clue1 and clue2, I try to modify
opentelemetry.instrumentation.celery.__init__.CeleryInstrumentor._trace_prerun
function and this is what I do:and then the worker output is work as expected:
The text was updated successfully, but these errors were encountered: