RUM-13564: Add GraphQL errors support to RUM resource events#3097
Open
RUM-13564: Add GraphQL errors support to RUM resource events#3097
Conversation
90cbf43 to
f8c49e5
Compare
This comment has been minimized.
This comment has been minimized.
0xnm
reviewed
Jan 5, 2026
...ndroid-rum/src/main/kotlin/com/datadog/android/rum/internal/domain/scope/RumResourceScope.kt
Outdated
Show resolved
Hide resolved
...ndroid-rum/src/main/kotlin/com/datadog/android/rum/internal/domain/scope/RumResourceScope.kt
Outdated
Show resolved
Hide resolved
...ndroid-rum/src/main/kotlin/com/datadog/android/rum/internal/domain/scope/RumResourceScope.kt
Outdated
Show resolved
Hide resolved
...ndroid-rum/src/main/kotlin/com/datadog/android/rum/internal/domain/scope/RumResourceScope.kt
Outdated
Show resolved
Hide resolved
...ndroid-rum/src/main/kotlin/com/datadog/android/rum/internal/domain/scope/RumResourceScope.kt
Outdated
Show resolved
Hide resolved
...ndroid-rum/src/main/kotlin/com/datadog/android/rum/internal/domain/scope/RumResourceScope.kt
Outdated
Show resolved
Hide resolved
...ndroid-rum/src/main/kotlin/com/datadog/android/rum/internal/domain/scope/RumResourceScope.kt
Outdated
Show resolved
Hide resolved
...id-rum/src/test/kotlin/com/datadog/android/rum/internal/domain/scope/RumResourceScopeTest.kt
Outdated
Show resolved
Hide resolved
| val graphqlOperationName = resourceAttributes.remove(RumAttributes.GRAPHQL_OPERATION_NAME) as? String | ||
| val graphqlOperationType = resourceAttributes.remove(RumAttributes.GRAPHQL_OPERATION_TYPE) as? String | ||
| val graphqlVariables = resourceAttributes.remove(RumAttributes.GRAPHQL_VARIABLES) as? String | ||
| val graphqlErrors = resourceAttributes.remove(RumAttributes.GRAPHQL_ERRORS) as? String |
Contributor
There was a problem hiding this comment.
Question. Where is this attribute set? IIUC Android SDK currently doesn't process errors from GraphQL response.
Or will this PR only work for React Native SDK, because it sets these attributes?
Contributor
Author
There was a problem hiding this comment.
We're setting these attributes in react-native yes and we need the android SDK to also parse the errors we set in those attributes similar to what's currently done on iOS.
f8c49e5 to
b5f4592
Compare
aleksandr-gringauz
approved these changes
Jan 13, 2026
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.
What does this PR do?
Adds GraphQL errors support to RUM resource events. Extracts and parses GraphQL errors from the
_dd.graphql.errorsattribute, and populatesresource.graphql.errorsandresource.graphql.error_countfields in RUM event data.Motivation
Achieve cross-platform parity with iOS SDK. React Native SDK sends GraphQL errors from JS, but Android wasn't parsing them, resulting in missing error data.
Additional Notes
This supports both wrapped errors format (e.g.,
_dd.graphql.errors: {"errors": [...]}) and direct array format (e.g.,_dd.graphql.errors: [...]) for flexibility. iOS only accepts the wrapped format, which was surprising given the the shape of the data, so here both work.Review checklist (to be filled by reviewers)