Skip to content

Commit ac8d5b8

Browse files
authored
fix: Add op types to transactions (#456)
* fix: Add op types to transactions * fix: Linting
1 parent 5fab49f commit ac8d5b8

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

sentry_sdk/integrations/celery.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ def _inner(*args, **kwargs):
105105
scope.add_event_processor(_make_event_processor(task, *args, **kwargs))
106106

107107
span = Span.continue_from_headers(args[3].get("headers") or {})
108+
span.op = "celery.task"
108109
span.transaction = "unknown celery task"
109110

110111
with capture_internal_exceptions():

sentry_sdk/integrations/rq.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ def sentry_patched_perform_job(self, job, *args, **kwargs):
5050
span = Span.continue_from_headers(
5151
job.meta.get("_sentry_trace_headers") or {}
5252
)
53+
span.op = "rq.task"
5354

5455
with capture_internal_exceptions():
5556
span.transaction = job.func_name

sentry_sdk/integrations/wsgi.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ def __call__(self, environ, start_response):
8787
scope.add_event_processor(_make_wsgi_event_processor(environ))
8888

8989
span = Span.continue_from_environ(environ)
90+
span.op = "http.server"
9091
span.transaction = "generic WSGI request"
9192

9293
with hub.span(span):

0 commit comments

Comments
 (0)