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 Apr 26, 2024
1 parent 6e09875 commit 294bdaa
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/integrations/celery/test_celery.py
Expand Up @@ -659,3 +659,17 @@ def task(): ...
(event,) = events
(span,) = event["spans"]
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"]

0 comments on commit 294bdaa

Please sign in to comment.