ref(strawberry): Simplify span creation#5647
1 issue
find-bugs: Found 1 issue (1 medium)
Medium
Exception status not propagated to span when GraphQL operation fails - `sentry_sdk/integrations/strawberry.py:204`
The new code calls self.graphql_span.__exit__(None, None, None) unconditionally, which tells the span that no exception occurred. In the Span.__exit__ method (tracing.py:399-400), exceptions are detected via the value parameter and result in setting the span status to INTERNAL_ERROR. By always passing None, exceptions raised during GraphQL operations will not be reflected in the span's status, losing important error context for observability.
Duration: 44.2s · Tokens: 105.7k in / 2.1k out · Cost: $0.26
Annotations
Check warning on line 204 in sentry_sdk/integrations/strawberry.py
sentry-warden / warden: find-bugs
Exception status not propagated to span when GraphQL operation fails
The new code calls `self.graphql_span.__exit__(None, None, None)` unconditionally, which tells the span that no exception occurred. In the `Span.__exit__` method (tracing.py:399-400), exceptions are detected via the `value` parameter and result in setting the span status to `INTERNAL_ERROR`. By always passing `None`, exceptions raised during GraphQL operations will not be reflected in the span's status, losing important error context for observability.