Skip to content

Commit

Permalink
test(celery): Test that message ID set on span
Browse files Browse the repository at this point in the history
  • Loading branch information
szokeasaurusrex committed May 7, 2024
1 parent 9d1a55b commit 91575bf
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/integrations/celery/test_celery.py
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,20 @@ def task(): ...
assert "messaging.destination.name" not in span["data"]


def test_messaging_id(init_celery, capture_events):
celery = init_celery(enable_tracing=True)
events = capture_events()

@celery.task
def example_task(): ...

example_task.apply_async()

(event,) = events
(span,) = event["spans"]
assert "messaging.message.id" in span["data"]


def test_retry_count_zero(init_celery, capture_events):
celery = init_celery(enable_tracing=True)
events = capture_events()
Expand Down

0 comments on commit 91575bf

Please sign in to comment.