Skip to content

Conversation

@sl0thentr0py
Copy link
Member

… threads (#1368)"

This reverts commit de0bc50.
This caused a regression (#1385) since the span finishes immediately in
__enter__ and so all db spans have wrong time durations.
@sl0thentr0py sl0thentr0py requested a review from antonpirker April 8, 2022 12:51
if execution_context is None:
return

span = getattr(execution_context, "_sentry_sql_span", None) # type: Optional[Span]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Below the execution_context._sentry_sql_span_manager is set back to None but _sentry_sql_span is never set to None. Is this intentional?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the span is only used for set_status so I guess it doesn't require cleanup like the context manager where lifecycle has to be managed properly.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

if execution_context is None:
return

span = getattr(execution_context, "_sentry_sql_span", None) # type: Optional[Span]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@antonpirker antonpirker merged commit 9a0c133 into master Apr 11, 2022
@antonpirker antonpirker deleted the neel/WEBBACKEND-138-sql-query-regression branch April 11, 2022 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants