Skip to content

Commit

Permalink
preserve behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
antonpirker committed Nov 19, 2024
1 parent 93e9219 commit 54cda52
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions sentry_sdk/integrations/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,12 @@ def __call__(self, environ, start_response):
origin=self.span_origin,
)

transaction = sentry_sdk.start_transaction(
transaction,
custom_sampling_context={"wsgi_environ": environ},
)
transaction.__enter__()
if transaction is not None:
transaction = sentry_sdk.start_transaction(
transaction,
custom_sampling_context={"wsgi_environ": environ},
)
transaction.__enter__()

try:
response = self.app(
Expand Down

0 comments on commit 54cda52

Please sign in to comment.