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 25, 2024
1 parent 8768488 commit e3d378d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/integrations/celery/test_celery.py
Expand Up @@ -616,3 +616,17 @@ def example_task():
pytest.fail("Calling `apply_async` without arguments raised a TypeError")

assert result.get() == "success"


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 e3d378d

Please sign in to comment.