File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
sentry_sdk/integrations/celery
tests/integrations/celery Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -312,6 +312,7 @@ def _inner(*args, **kwargs):
312312 # Celery task objects are not a thing to be trusted. Even
313313 # something such as attribute access can fail.
314314 headers = args [3 ].get ("headers" ) or {}
315+ import ipdb ; ipdb .set_trace ()
315316 with sentry_sdk .continue_trace (headers ):
316317 with sentry_sdk .start_span (
317318 op = OP .QUEUE_TASK_CELERY ,
Original file line number Diff line number Diff line change @@ -543,20 +543,20 @@ def dummy_task(self, message):
543543 return trace_id
544544
545545 with sentry_sdk .start_span (name = "task" ) as root_span :
546- transaction_trace_id = root_span .trace_id
546+ root_span_trace_id = root_span .trace_id
547547
548548 # should propagate trace
549- task_transaction_id = dummy_task .apply_async (
549+ task_trace_id = dummy_task .apply_async (
550550 args = ("some message" ,),
551551 ).get ()
552- assert transaction_trace_id == task_transaction_id
552+ assert root_span_trace_id == task_trace_id , "Trace should be propagated"
553553
554554 # should NOT propagate trace (overrides `propagate_traces` parameter in integration constructor)
555- task_transaction_id = dummy_task .apply_async (
555+ task_trace_id = dummy_task .apply_async (
556556 args = ("another message" ,),
557557 headers = {"sentry-propagate-traces" : False },
558558 ).get ()
559- assert transaction_trace_id != task_transaction_id
559+ assert root_span_trace_id != task_trace_id , "Trace should NOT be propagated"
560560
561561
562562def test_apply_async_manually_span (sentry_init ):
You can’t perform that action at this time.
0 commit comments