Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regenerate rum model #1344

Merged
merged 4 commits into from
Jun 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
310 changes: 259 additions & 51 deletions Sources/Datadog/RUM/DataModels/RUMDataModels.swift

Large diffs are not rendered by default.

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
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