Skip to content

Commit

Permalink
ref(celery): MESSAGING.SYSTEM SPANDATA constant
Browse files Browse the repository at this point in the history
ref #2951
  • Loading branch information
szokeasaurusrex committed May 10, 2024
1 parent 60c2d53 commit 6c84461
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions sentry_sdk/consts.py
Expand Up @@ -249,6 +249,11 @@ class SPANDATA:
Number of retries/attempts to process a message.
"""

MESSAGING_SYSTEM = "messaging.system"
"""
The messaging system's name, e.g. `kafka`, `aws_sqs`
"""

SERVER_ADDRESS = "server.address"
"""
Name of the database host.
Expand Down
3 changes: 2 additions & 1 deletion sentry_sdk/integrations/celery/__init__.py
Expand Up @@ -364,7 +364,8 @@ def _inner(*args, **kwargs):
)
with capture_internal_exceptions():
span.set_data(
"messaging.system", task.app.connection().transport.driver_type
SPANDATA.MESSAGING_SYSTEM,
task.app.connection().transport.driver_type,
)

return f(*args, **kwargs)
Expand Down

0 comments on commit 6c84461

Please sign in to comment.