Skip to content

Commit

Permalink
feat(celery): Change inner span op to "queue.process"
Browse files Browse the repository at this point in the history
  • Loading branch information
szokeasaurusrex committed Apr 24, 2024
1 parent f941370 commit 5a99aad
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions sentry_sdk/consts.py
Expand Up @@ -245,6 +245,7 @@ class OP:
MIDDLEWARE_STARLITE_SEND = "middleware.starlite.send"
OPENAI_CHAT_COMPLETIONS_CREATE = "ai.chat_completions.create.openai"
OPENAI_EMBEDDINGS_CREATE = "ai.embeddings.create.openai"
QUEUE_PROCESS = "queue.process"
QUEUE_SUBMIT_ARQ = "queue.submit.arq"
QUEUE_TASK_ARQ = "queue.task.arq"
QUEUE_SUBMIT_CELERY = "queue.submit.celery"
Expand Down
2 changes: 1 addition & 1 deletion sentry_sdk/integrations/celery/__init__.py
Expand Up @@ -334,7 +334,7 @@ def _inner(*args, **kwargs):
# type: (*Any, **Any) -> Any
try:
with sentry_sdk.start_span(
op=OP.QUEUE_TASK_CELERY, description=task.name
op=OP.QUEUE_PROCESS, description=task.name
) as span:
_set_messaging_destination_name(task, span)
return f(*args, **kwargs)
Expand Down
2 changes: 1 addition & 1 deletion tests/integrations/celery/test_celery.py
Expand Up @@ -215,7 +215,7 @@ def dummy_task(x, y):
>= {
"trace_id": str(transaction.trace_id),
"same_process_as_parent": True,
"op": "queue.task.celery",
"op": "queue.process",
"description": "dummy_task",
"data": ApproxDict(),
}.items()
Expand Down

0 comments on commit 5a99aad

Please sign in to comment.