Skip to content

Commit

Permalink
Merge pull request #715 from DataDog/jward/RUMM-1900-flutter-error-so…
Browse files Browse the repository at this point in the history
…urce

RUMM-1900/1904 Update RUM Schema
  • Loading branch information
buranmert authored Jan 14, 2022
2 parents 79c63be + 9411e48 commit ddd210b
Show file tree
Hide file tree
Showing 10 changed files with 561 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,12 @@ internal struct CrashReportingWithRUMIntegration: CrashReportingIntegration {

let rumError = RUMErrorEvent(
dd: .init(
browserSdkVersion: nil,
session: .init(plan: .plan1)
),
action: nil,
application: .init(id: lastRUMView.application.id),
ciTest: nil,
connectivity: lastRUMView.connectivity,
context: nil,
date: crashDate.timeIntervalSince1970.toInt64Milliseconds,
Expand All @@ -250,6 +252,7 @@ internal struct CrashReportingWithRUMIntegration: CrashReportingIntegration {
id: lastRUMView.session.id,
type: .user
),
source: .ios,
synthetics: nil,
usr: lastRUMView.usr,
view: .init(
Expand All @@ -271,15 +274,18 @@ internal struct CrashReportingWithRUMIntegration: CrashReportingIntegration {
let original = rumViewEvent.model
let rumView = RUMViewEvent(
dd: .init(
browserSdkVersion: nil,
documentVersion: original.dd.documentVersion + 1,
session: .init(plan: .plan1)
),
application: original.application,
ciTest: nil,
connectivity: original.connectivity,
context: original.context,
date: crashDate.timeIntervalSince1970.toInt64Milliseconds - 1, // -1ms to put the crash after view in RUM session
service: original.service,
session: original.session,
source: .ios,
synthetics: nil,
usr: original.usr,
view: .init(
Expand Down Expand Up @@ -333,12 +339,14 @@ internal struct CrashReportingWithRUMIntegration: CrashReportingIntegration {

let rumView = RUMViewEvent(
dd: .init(
browserSdkVersion: nil,
documentVersion: 1,
session: .init(plan: .plan1)
),
application: .init(
id: rumConfiguration.applicationID
),
ciTest: nil,
connectivity: RUMConnectivity(
networkInfo: crashContext.lastNetworkConnectionInfo,
carrierInfo: crashContext.lastCarrierInfo
Expand All @@ -351,6 +359,7 @@ internal struct CrashReportingWithRUMIntegration: CrashReportingIntegration {
id: sessionUUID.toRUMDataFormat,
type: .user
),
source: .ios,
synthetics: nil,
usr: crashContext.lastUserInfo.flatMap { RUMUser(userInfo: $0) },
view: .init(
Expand Down
Loading

0 comments on commit ddd210b

Please sign in to comment.