2025-12-01
This commit is contained in:
@@ -13,7 +13,7 @@ from sentry_sdk.integrations._wsgi_common import (
|
||||
)
|
||||
from sentry_sdk.sessions import track_session
|
||||
from sentry_sdk.scope import use_isolation_scope
|
||||
from sentry_sdk.tracing import Transaction, TRANSACTION_SOURCE_ROUTE
|
||||
from sentry_sdk.tracing import Transaction, TransactionSource
|
||||
from sentry_sdk.utils import (
|
||||
ContextVar,
|
||||
capture_internal_exceptions,
|
||||
@@ -115,18 +115,19 @@ class SentryWsgiMiddleware:
|
||||
environ,
|
||||
op=OP.HTTP_SERVER,
|
||||
name="generic WSGI request",
|
||||
source=TRANSACTION_SOURCE_ROUTE,
|
||||
source=TransactionSource.ROUTE,
|
||||
origin=self.span_origin,
|
||||
)
|
||||
|
||||
with (
|
||||
transaction_context = (
|
||||
sentry_sdk.start_transaction(
|
||||
transaction,
|
||||
custom_sampling_context={"wsgi_environ": environ},
|
||||
)
|
||||
if transaction is not None
|
||||
else nullcontext()
|
||||
):
|
||||
)
|
||||
with transaction_context:
|
||||
try:
|
||||
response = self.app(
|
||||
environ,
|
||||
|
||||
Reference in New Issue
Block a user