Skip to content

Commit 99dfeea

Browse files
authored
Merge pull request #2442 from DataDog/nogorodnikov/fix-ddlogevent-accountinfo-property
Fix `DDLogEvent.accountInfo` initialization
2 parents bd63f86 + 4c32563 commit 99dfeea

4 files changed

Lines changed: 16 additions & 7 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Unreleased
22

3+
- [FIX] Fix `DDLogEvent.accountInfo` property initialization in case of missing account info. See [#2442][]
34
- [IMPROVEMENT] Update the default tracing sampling rate to 100%. See [#2253][]
45
- [IMPROVEMENT] Update the default TraceContextInjection to `.sampled`. See [#2253][]
56
- [IMPROVEMENT] Enforce head-based sampling on Trace by default. See [#2288][]
@@ -945,6 +946,7 @@ Release `2.0` introduces breaking changes. Follow the [Migration Guide](MIGRATIO
945946
[#2370]: https://github.com/DataDog/dd-sdk-ios/pull/2370
946947
[#2395]: https://github.com/DataDog/dd-sdk-ios/pull/2395
947948
[#2405]: https://github.com/DataDog/dd-sdk-ios/pull/2405
949+
[#2442]: https://github.com/DataDog/dd-sdk-ios/pull/2442
948950

949951
[@00fa9a]: https://github.com/00FA9A
950952
[@britton-earnin]: https://github.com/Britton-Earnin

DatadogLogs/Sources/LogsDataModels+objc.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,12 @@ public class objc_LogEvent: NSObject {
9090
.init(root: self)
9191
}
9292

93-
public var accountInfo: objc_LogEventAccountInfo {
94-
.init(root: self)
93+
public var accountInfo: objc_LogEventAccountInfo? {
94+
if swiftModel.accountInfo != nil {
95+
.init(root: self)
96+
} else {
97+
nil
98+
}
9599
}
96100

97101
public var networkConnectionInfo: objc_LogEventNetworkConnectionInfo? {

api-surface-objc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public class objc_LogEvent: NSObject
145145
public var device: objc_LogEventDevice
146146
public var os: objc_LogEventOperatingSystem
147147
public var userInfo: objc_LogEventUserInfo
148-
public var accountInfo: objc_LogEventAccountInfo
148+
public var accountInfo: objc_LogEventAccountInfo?
149149
public var networkConnectionInfo: objc_LogEventNetworkConnectionInfo?
150150
public var mobileCarrierInfo: objc_LogEventCarrierInfo?
151151
public var attributes: objc_LogEventAttributes
@@ -1590,7 +1590,7 @@ public class objc_RUMViewEventView: NSObject
15901590
public var cumulativeLayoutShift: NSNumber?
15911591
public var cumulativeLayoutShiftTargetSelector: String?
15921592
public var cumulativeLayoutShiftTime: NSNumber?
1593-
public var customTimings: [String: NSNumber]?
1593+
public var customTimings: objc_RUMViewEventViewCustomTimings?
15941594
public var domComplete: NSNumber?
15951595
public var domContentLoaded: NSNumber?
15961596
public var domInteractive: NSNumber?
@@ -1660,6 +1660,8 @@ public class objc_RUMViewEventViewAction: NSObject
16601660
public var count: NSNumber
16611661
public class objc_RUMViewEventViewCrash: NSObject
16621662
public var count: NSNumber
1663+
public class objc_RUMViewEventViewCustomTimings: NSObject
1664+
public var customTimingsInfo: [String: NSNumber]
16631665
public class objc_RUMViewEventViewError: NSObject
16641666
public var count: NSNumber
16651667
public class objc_RUMViewEventViewFlutterBuildTime: NSObject
@@ -1919,7 +1921,7 @@ public class objc_RUMVitalEventVital: NSObject
19191921
public var failureReason: objc_RUMVitalEventVitalFailureReason
19201922
public var id: String
19211923
public var name: String?
1922-
public var parentId: String?
1924+
public var operationKey: String?
19231925
public var stepType: objc_RUMVitalEventVitalStepType
19241926
public var type: objc_RUMVitalEventVitalVitalType
19251927
public enum objc_RUMVitalEventVitalFailureReason: Int
@@ -1935,7 +1937,7 @@ public enum objc_RUMVitalEventVitalStepType: Int
19351937
case end
19361938
public enum objc_RUMVitalEventVitalVitalType: Int
19371939
case duration
1938-
case step
1940+
case operationStep
19391941
public class objc_TelemetryErrorEvent: NSObject
19401942
public internal(set) var swiftModel: TelemetryErrorEvent
19411943
public init(swiftModel: TelemetryErrorEvent)

api-surface-swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1121,7 +1121,7 @@ public class SessionReplayWireframesBuilder
11211121
public struct FontOverride
11221122
public init(size: CGFloat?)
11231123
public func createShapeWireframe(id: WireframeID,frame: CGRect,clip: CGRect,borderColor: CGColor? = nil,borderWidth: CGFloat? = nil,backgroundColor: CGColor? = nil,cornerRadius: CGFloat? = nil,opacity: CGFloat? = nil) -> SRWireframe
1124-
public func createImageWireframe(id: WireframeID,resource: SessionReplayResource,frame: CGRect,clip: CGRect,mimeType: String = "png",borderColor: CGColor? = nil,borderWidth: CGFloat? = nil,backgroundColor: CGColor? = nil,cornerRadius: CGFloat? = nil,opacity: CGFloat? = nil) -> SRWireframe
1124+
public func createImageWireframe(id: WireframeID,resource: SessionReplayResource,frame: CGRect,clip: CGRect,borderColor: CGColor? = nil,borderWidth: CGFloat? = nil,backgroundColor: CGColor? = nil,cornerRadius: CGFloat? = nil,opacity: CGFloat? = nil) -> SRWireframe
11251125
public func createTextWireframe(id: WireframeID,frame: CGRect,clip: CGRect,text: String,textFrame: CGRect? = nil,textAlignment: SRTextPosition.Alignment? = nil,textColor: CGColor? = nil,font: UIFont? = nil,fontOverride: FontOverride? = nil,fontScalingEnabled: Bool = false,borderColor: CGColor? = nil,borderWidth: CGFloat? = nil,backgroundColor: CGColor? = nil,cornerRadius: CGFloat? = nil,opacity: CGFloat? = nil) -> SRWireframe
11261126
public func createPlaceholderWireframe(id: Int64,frame: CGRect,clip: CGRect,label: String) -> SRWireframe
11271127
public func visibleWebViewWireframe(id: Int,frame: CGRect,clip: CGRect,borderColor: CGColor? = nil,borderWidth: CGFloat? = nil,backgroundColor: CGColor? = nil,cornerRadius: CGFloat? = nil,opacity: CGFloat? = nil) -> SRWireframe
@@ -1163,6 +1163,7 @@ public struct SessionReplayNode
11631163
public let wireframesBuilder: SessionReplayNodeWireframesBuilder
11641164
public init(viewAttributes: SessionReplayViewAttributes, wireframesBuilder: SessionReplayNodeWireframesBuilder)
11651165
public protocol SessionReplayResource
1166+
var mimeType: String
11661167
func calculateIdentifier() -> String
11671168
func calculateData() -> Data
11681169
public struct SessionReplayViewAttributes: Equatable

0 commit comments

Comments
 (0)