Skip to content

ref(strawberry): Simplify span creation#5647

Merged
sentrivana merged 3 commits into
masterfrom
ivana/fixup-strawberry-integration
Mar 12, 2026
Merged

ref(strawberry): Simplify span creation#5647
sentrivana merged 3 commits into
masterfrom
ivana/fixup-strawberry-integration

.

e28a436
Select commit
Loading
Failed to load commit list.
@sentry/warden / warden: find-bugs completed Mar 12, 2026 in 45s

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

See this annotation in the file changed.

@sentry-warden 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.