Skip to content

.

e28a436
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Merged

ref(strawberry): Simplify span creation #5647

.
e28a436
Select commit
Loading
Failed to load commit list.
GitHub Actions / warden: find-bugs completed Mar 12, 2026 in 1m 0s

1 issue

find-bugs: Found 1 issue (1 medium)

Medium

Span.__exit__ always called with None arguments, preventing error status on exceptions - `sentry_sdk/integrations/strawberry.py:204`

The Span.__exit__ method checks if value is not None to set SPANSTATUS.INTERNAL_ERROR on the span when an exception occurs. By always calling self.graphql_span.__exit__(None, None, None), exceptions that occur during GraphQL operations won't mark the span as errored. This means error tracking for GraphQL operations loses exception context that the Span class is designed to capture.


Duration: 59.7s · Tokens: 176.9k in / 2.8k out · Cost: $0.32

Annotations

Check warning on line 204 in sentry_sdk/integrations/strawberry.py

See this annotation in the file changed.

@github-actions github-actions / warden: find-bugs

Span.__exit__ always called with None arguments, preventing error status on exceptions

The `Span.__exit__` method checks if `value is not None` to set `SPANSTATUS.INTERNAL_ERROR` on the span when an exception occurs. By always calling `self.graphql_span.__exit__(None, None, None)`, exceptions that occur during GraphQL operations won't mark the span as errored. This means error tracking for GraphQL operations loses exception context that the Span class is designed to capture.