Skip to content

Commit

Permalink
Merge pull request #1344 from DataDog/maciey/rum-models-update
Browse files Browse the repository at this point in the history
Regenerate rum model
  • Loading branch information
maciejburda authored Jun 29, 2023
2 parents dd6a509 + 6fb6e80 commit 1b8cd0b
Show file tree
Hide file tree
Showing 11 changed files with 627 additions and 125 deletions.
310 changes: 259 additions & 51 deletions Sources/Datadog/RUM/DataModels/RUMDataModels.swift

Large diffs are not rendered by default.

9 changes: 8 additions & 1 deletion Sources/Datadog/RUM/Integrations/CrashReportReceiver.swift
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,8 @@ internal struct CrashReportReceiver: FeatureMessageReceiver {
dd: .init(
browserSdkVersion: nil,
documentVersion: original.dd.documentVersion + 1,
pageStates: nil,
replayStats: nil,
session: .init(plan: .plan1)
),
application: original.application,
Expand All @@ -383,6 +385,7 @@ internal struct CrashReportReceiver: FeatureMessageReceiver {
device: original.device,
display: nil,
os: original.os,
privacy: nil,
service: original.service,
session: original.session,
source: original.source ?? .ios,
Expand Down Expand Up @@ -446,6 +449,8 @@ internal struct CrashReportReceiver: FeatureMessageReceiver {
dd: .init(
browserSdkVersion: nil,
documentVersion: 1,
pageStates: nil,
replayStats: nil,
session: .init(plan: .plan1)
),
application: .init(
Expand All @@ -465,12 +470,14 @@ internal struct CrashReportReceiver: FeatureMessageReceiver {
// before restarting the app after crash. To solve this, the OS information would have to be
// persisted in `crashContext` the same way as we do for other dynamic information.
os: .init(device: context.device),
privacy: nil,
service: context.service,
session: .init(
hasReplay: hasReplay,
id: sessionUUID.toRUMDataFormat,
isActive: true,
startReason: nil,
sampledForReplay: nil,
startPrecondition: nil,
type: CITestIntegration.active != nil ? .ciTest : .user
),
source: .init(rawValue: context.source) ?? .ios,
Expand Down
1 change: 1 addition & 0 deletions Sources/Datadog/RUM/RUMEvent/RUMOperatingSystemInfo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ extension RUMOperatingSystem {
self.name = device.osName
self.version = device.osVersion
self.versionMajor = device.osVersion.split(separator: ".").first.map { String($0) } ?? device.osVersion
self.build = nil
}
}
6 changes: 5 additions & 1 deletion Sources/Datadog/RUM/RUMMonitor/Scopes/RUMViewScope.swift
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,8 @@ internal class RUMViewScope: RUMScope, RUMContextProvider {
dd: .init(
browserSdkVersion: nil,
documentVersion: version.toInt64,
pageStates: nil,
replayStats: nil,
session: .init(plan: .plan1)
),
application: .init(id: self.context.rumApplicationID),
Expand All @@ -452,12 +454,14 @@ internal class RUMViewScope: RUMScope, RUMContextProvider {
display: nil,
featureFlags: .init(featureFlagsInfo: featureFlags),
os: .init(context: context),
privacy: nil,
service: context.service,
session: .init(
hasReplay: context.srBaggage?.isReplayBeingRecorded,
id: self.context.sessionID.toRUMDataFormat,
isActive: self.context.isSessionActive,
startReason: nil,
sampledForReplay: nil,
startPrecondition: nil,
type: dependencies.ciTest != nil ? .ciTest : .user
),
source: .init(rawValue: context.source) ?? .ios,
Expand Down
Loading

0 comments on commit 1b8cd0b

Please sign in to comment.