Skip to content

Commit efe9e39

Browse files
Apply suggestions from code review
Co-authored-by: Ivana Kellyer <[email protected]>
1 parent cebe0f4 commit efe9e39

File tree

1 file changed

+2
-2
lines changed
  • sentry_sdk/integrations/openai_agents

1 file changed

+2
-2
lines changed

sentry_sdk/integrations/openai_agents/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ def _capture_exception(exc):
3131
def _get_start_span_function():
3232
# type: () -> Callable[..., Any]
3333
current_span = sentry_sdk.get_current_span()
34-
is_transaction = (
34+
transaction_exists = (
3535
current_span is not None and current_span.containing_transaction == current_span
3636
)
37-
return sentry_sdk.start_span if is_transaction else sentry_sdk.start_transaction
37+
return sentry_sdk.start_span if transaction_exists else sentry_sdk.start_transaction
3838

3939

4040
def _set_agent_data(span, agent):

0 commit comments

Comments
 (0)