Skip to content

Commit f76454c

Browse files
committed
fluff
1 parent ee5bfee commit f76454c

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

sentry_sdk/integrations/tornado.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def sentry_log_exception(
102102
RequestHandler.log_exception = sentry_log_exception
103103

104104

105-
_DEFAULT_TRANSACTION_NAME = "generic Tornado request"
105+
_DEFAULT_ROOT_SPAN_NAME = "generic Tornado request"
106106

107107

108108
@contextlib.contextmanager
@@ -131,7 +131,7 @@ def _handle_request_impl(self: "RequestHandler") -> "Generator[None, None, None]
131131
scope.set_custom_sampling_context({"tornado_request": self.request})
132132

133133
span_ctx = sentry_sdk.traces.start_span(
134-
name=_DEFAULT_TRANSACTION_NAME,
134+
name=_DEFAULT_ROOT_SPAN_NAME,
135135
attributes={
136136
"sentry.op": OP.HTTP_SERVER,
137137
"sentry.origin": TornadoIntegration.origin,
@@ -147,7 +147,7 @@ def _handle_request_impl(self: "RequestHandler") -> "Generator[None, None, None]
147147
# fallback transaction in case there is no route.
148148
# sentry_urldispatcher_resolve is responsible for
149149
# setting a transaction name later.
150-
name=_DEFAULT_TRANSACTION_NAME,
150+
name=_DEFAULT_ROOT_SPAN_NAME,
151151
source=TransactionSource.ROUTE,
152152
origin=TornadoIntegration.origin,
153153
)
@@ -160,9 +160,7 @@ def _handle_request_impl(self: "RequestHandler") -> "Generator[None, None, None]
160160
try:
161161
yield
162162
finally:
163-
if isinstance(span, StreamedSpan) and not isinstance(
164-
span, NoOpStreamedSpan
165-
):
163+
if type(span) is StreamedSpan:
166164
with capture_internal_exceptions():
167165
for attr, value in _get_request_attributes(
168166
self.request

0 commit comments

Comments
 (0)