You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: features/dd-sdk-android-rum/src/main/kotlin/com/datadog/android/rum/internal/domain/scope/RumResourceScope.kt
+10-3Lines changed: 10 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -253,6 +253,9 @@ internal class RumResourceScope(
253
253
val graphqlOperationType = resourceAttributes.remove(RumAttributes.GRAPHQL_OPERATION_TYPE) as?String
254
254
val graphqlVariables = resourceAttributes.remove(RumAttributes.GRAPHQL_VARIABLES) as?String
255
255
256
+
val graphqlErrors = (resourceAttributes.remove(RumAttributes.GRAPHQL_ERRORS) as?List<*>)
257
+
?.mapNotNull { it as?ResourceEvent.Error }
258
+
256
259
// The decision whether to send payloads is determined by a DatadogApolloInterceptor parameter
257
260
val rawPayload = resourceAttributes.remove(RumAttributes.GRAPHQL_PAYLOAD) as?String
258
261
val graphqlPayload = rawPayload?.truncateToUtf8Bytes(MAX_GRAPHQL_PAYLOAD_SIZE_BYTES)
@@ -261,7 +264,8 @@ internal class RumResourceScope(
Copy file name to clipboardExpand all lines: features/dd-sdk-android-rum/src/test/kotlin/com/datadog/android/rum/internal/domain/scope/RumResourceScopeTest.kt
+205Lines changed: 205 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -3668,6 +3668,211 @@ internal class RumResourceScopeTest {
3668
3668
}
3669
3669
}
3670
3670
3671
+
@Test
3672
+
fun`M parse GraphQL errors W handleEvent { multiple errors with locations and path }`(
3673
+
@Forgery kind:RumResourceKind,
3674
+
@LongForgery(200, 600) statusCode:Long,
3675
+
@LongForgery(0, 1024) size:Long,
3676
+
forge:Forge
3677
+
) {
3678
+
// Given
3679
+
val operationType = forge.aValueFrom(ResourceEvent.OperationType::class.java)
0 commit comments