Skip to content

ref(strawberry): Simplify span creation #1724

ref(strawberry): Simplify span creation

ref(strawberry): Simplify span creation #1724

Triggered via pull request March 12, 2026 12:02
@sentrivanasentrivana
synchronize #5647
Status Success
Total duration 18s
Artifacts

changelog-preview.yml

on: pull_request_target
changelog-preview  /  preview
16s
changelog-preview / preview
Fit to window
Zoom out
Zoom in

Annotations

2 warnings
changelog-preview / preview
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions/checkout@v4. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
Span context manager not properly closed on exception - span leaks and scope corruption: sentry_sdk/integrations/strawberry.py#L189
The new code calls `self.graphql_span.__enter__()` at line 189 and `self.graphql_span.__exit__(None, None, None)` at line 204, but if an exception is thrown into the generator at the `yield` statement (line 196), the code after `yield` never executes. This leaves the span unfinished and corrupts the scope because `__exit__` restores the old span. Additionally, passing `(None, None, None)` to `__exit__` prevents the span from being marked with `INTERNAL_ERROR` status when an exception occurs.