feat(browser): Add support for GraphQL persisted operations#18505
Merged
andreiborza merged 6 commits intogetsentry:developfrom Dec 15, 2025
Merged
feat(browser): Add support for GraphQL persisted operations#18505andreiborza merged 6 commits intogetsentry:developfrom
andreiborza merged 6 commits intogetsentry:developfrom
Conversation
The isPersistedRequest type guard now validates that sha256Hash and version properties exist in the persistedQuery object, preventing undefined values from being set as span attributes and breadcrumb data. Added tests for edge cases: - Empty persistedQuery object - Missing sha256Hash property - Missing version property 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
andreiborza
reviewed
Dec 15, 2025
Comment on lines
95
to
96
| span.setAttribute('graphql.persistedQuery.sha256Hash', graphqlBody.extensions.persistedQuery.sha256Hash); | ||
| span.setAttribute('graphql.persistedQuery.version', graphqlBody.extensions.persistedQuery.version); |
Member
There was a problem hiding this comment.
h: OpenTelemetry semantic convention are snake_case, I think we should go with graphql.persisted_query.hash.sha256 and graphql.persisted_query.version to be more in line with semconvs.
andreiborza
reviewed
Dec 15, 2025
Comment on lines
131
to
132
| data['graphql.persistedQuery.sha256Hash'] = graphqlBody.extensions.persistedQuery.sha256Hash; | ||
| data['graphql.persistedQuery.version'] = graphqlBody.extensions.persistedQuery.version; |
Member
There was a problem hiding this comment.
h: Same here, let's get snake_case going and prefix the hash
andreiborza
reviewed
Dec 15, 2025
andreiborza
reviewed
Dec 15, 2025
Member
andreiborza
left a comment
There was a problem hiding this comment.
This looks good to me, I'll take over making the suggested changes and fixing the tests.
Thanks for the contribution!
Contributor
Author
|
Awesome, thanks a lot for the collaboration and velocity! You're quick haha. This helps a ton, so thanks for looking into this. |
e319da1 to
e5e38fa
Compare
andreiborza
approved these changes
Dec 15, 2025
Member
andreiborza
left a comment
There was a problem hiding this comment.
Thanks again for the contribution!
onurtemizkan
pushed a commit
that referenced
this pull request
Dec 15, 2025
Closes: #18499 --------- Co-authored-by: tbeeren <tbeeren@bol.com> Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com> Co-authored-by: Andrei Borza <andrei.borza@sentry.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before submitting a pull request, please take a look at our
Contributing guidelines and verify:
yarn lint) & (yarn test).Closes: #18499