Skip to content

Commit 258da4e

Browse files
RUM 10115 Collect Locale attributes
1 parent a498e1e commit 258da4e

File tree

16 files changed

+976
-60
lines changed

16 files changed

+976
-60
lines changed

Datadog/Datadog.xcodeproj/project.pbxproj

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -848,6 +848,10 @@
848848
61FDBA1726974CA9001D9D43 /* DDCrashReportBuilderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61FDBA1626974CA9001D9D43 /* DDCrashReportBuilderTests.swift */; };
849849
86092FDD2DEDC6830075D63B /* AccessibilityValuesMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86092FDC2DEDC6830075D63B /* AccessibilityValuesMock.swift */; };
850850
86092FDE2DEDC6830075D63B /* AccessibilityValuesMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86092FDC2DEDC6830075D63B /* AccessibilityValuesMock.swift */; };
851+
861FD6852DF2EAED00F59823 /* LocaleInfoPublisherTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 861FD6842DF2EAED00F59823 /* LocaleInfoPublisherTests.swift */; };
852+
861FD6862DF2EAED00F59823 /* LocaleInfoPublisherTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 861FD6842DF2EAED00F59823 /* LocaleInfoPublisherTests.swift */; };
853+
861FD6882DF3366400F59823 /* LocaleInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 861FD6872DF3366400F59823 /* LocaleInfo.swift */; };
854+
861FD6892DF3366400F59823 /* LocaleInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 861FD6872DF3366400F59823 /* LocaleInfo.swift */; };
851855
862B0B272DEF2D8000F61E73 /* MockNotificationCenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 862B0B262DEF2D8000F61E73 /* MockNotificationCenter.swift */; };
852856
862B0B282DEF2D8000F61E73 /* MockNotificationCenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 862B0B262DEF2D8000F61E73 /* MockNotificationCenter.swift */; };
853857
864A70792DDF742A00AC0619 /* Accessibility.swift in Sources */ = {isa = PBXBuildFile; fileRef = 864A70782DDF742A00AC0619 /* Accessibility.swift */; };
@@ -856,6 +860,8 @@
856860
864A707D2DDF743900AC0619 /* AccessibilityReader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 864A707B2DDF743900AC0619 /* AccessibilityReader.swift */; };
857861
864A70802DE092AD00AC0619 /* AccessibilityReaderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 864A707E2DE092AD00AC0619 /* AccessibilityReaderTests.swift */; };
858862
864A70812DE092AD00AC0619 /* AccessibilityReaderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 864A707E2DE092AD00AC0619 /* AccessibilityReaderTests.swift */; };
863+
86B43EC72DE464ED00FDDD29 /* LocaleInfoPublisher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86B43EC62DE464ED00FDDD29 /* LocaleInfoPublisher.swift */; };
864+
86B43EC82DE464ED00FDDD29 /* LocaleInfoPublisher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86B43EC62DE464ED00FDDD29 /* LocaleInfoPublisher.swift */; };
859865
960A0D3B2D6E2490004BB999 /* Reflector.swift in Sources */ = {isa = PBXBuildFile; fileRef = 960A0D3A2D6E2490004BB999 /* Reflector.swift */; };
860866
960A0D3C2D6E2490004BB999 /* CustomDump.swift in Sources */ = {isa = PBXBuildFile; fileRef = 960A0D382D6E2490004BB999 /* CustomDump.swift */; };
861867
960A0D3D2D6E2490004BB999 /* ReflectionMirror.swift in Sources */ = {isa = PBXBuildFile; fileRef = 960A0D392D6E2490004BB999 /* ReflectionMirror.swift */; };
@@ -2953,10 +2959,13 @@
29532959
61FF416125EE5FF400CE35EC /* CrashLogReceiverTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CrashLogReceiverTests.swift; sourceTree = "<group>"; };
29542960
61FF9A4425AC5DEA001058CC /* ViewIdentifier.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewIdentifier.swift; sourceTree = "<group>"; };
29552961
86092FDC2DEDC6830075D63B /* AccessibilityValuesMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccessibilityValuesMock.swift; sourceTree = "<group>"; };
2962+
861FD6842DF2EAED00F59823 /* LocaleInfoPublisherTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocaleInfoPublisherTests.swift; sourceTree = "<group>"; };
2963+
861FD6872DF3366400F59823 /* LocaleInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocaleInfo.swift; sourceTree = "<group>"; };
29562964
862B0B262DEF2D8000F61E73 /* MockNotificationCenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockNotificationCenter.swift; sourceTree = "<group>"; };
29572965
864A70782DDF742A00AC0619 /* Accessibility.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Accessibility.swift; sourceTree = "<group>"; };
29582966
864A707B2DDF743900AC0619 /* AccessibilityReader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccessibilityReader.swift; sourceTree = "<group>"; };
29592967
864A707E2DE092AD00AC0619 /* AccessibilityReaderTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccessibilityReaderTests.swift; sourceTree = "<group>"; };
2968+
86B43EC62DE464ED00FDDD29 /* LocaleInfoPublisher.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocaleInfoPublisher.swift; sourceTree = "<group>"; };
29602969
960A0D382D6E2490004BB999 /* CustomDump.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomDump.swift; sourceTree = "<group>"; };
29612970
960A0D392D6E2490004BB999 /* ReflectionMirror.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReflectionMirror.swift; sourceTree = "<group>"; };
29622971
960A0D3A2D6E2490004BB999 /* Reflector.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Reflector.swift; sourceTree = "<group>"; };
@@ -5425,6 +5434,7 @@
54255434
617699162A8608C20030022B /* Context */ = {
54265435
isa = PBXGroup;
54275436
children = (
5437+
861FD6842DF2EAED00F59823 /* LocaleInfoPublisherTests.swift */,
54285438
266BFA5D2D6F4E2A003041A5 /* AccountInfoPublisherTests.swift */,
54295439
614B78EC296D7B63009C6B92 /* LowPowerModePublisherTests.swift */,
54305440
D2EFA874286E011900F1FAA6 /* DatadogContextProviderTests.swift */,
@@ -6232,6 +6242,7 @@
62326242
D23039BE298D5235001A1FA3 /* LaunchTime.swift */,
62336243
D2F8235229915E12003C7E99 /* DatadogSite.swift */,
62346244
6174D6122BFDF16C00EC7469 /* BundleType.swift */,
6245+
861FD6872DF3366400F59823 /* LocaleInfo.swift */,
62356246
);
62366247
path = Context;
62376248
sourceTree = "<group>";
@@ -6802,6 +6813,7 @@
68026813
D2553828288F0B2300727FAD /* LowPowerModePublisher.swift */,
68036814
D29294DF291D5ECD00F8EFF9 /* ApplicationVersionPublisher.swift */,
68046815
D2FB1253292E0E92005B13F8 /* TrackingConsentPublisher.swift */,
6816+
86B43EC62DE464ED00FDDD29 /* LocaleInfoPublisher.swift */,
68056817
);
68066818
path = Context;
68076819
sourceTree = "<group>";
@@ -8417,6 +8429,7 @@
84178429
D29294E0291D5ED100F8EFF9 /* ApplicationVersionPublisher.swift in Sources */,
84188430
61D3E0D9277B23F1008BE766 /* KronosNTPProtocol.swift in Sources */,
84198431
61D3E0DA277B23F1008BE766 /* KronosTimeFreeze.swift in Sources */,
8432+
86B43EC82DE464ED00FDDD29 /* LocaleInfoPublisher.swift in Sources */,
84208433
61ED39D426C2A36B002C0F26 /* DataUploadStatus.swift in Sources */,
84218434
61133BD72423979B00786299 /* DataUploadWorker.swift in Sources */,
84228435
61D3E0D4277B23F1008BE766 /* KronosTimeStorage.swift in Sources */,
@@ -8541,6 +8554,7 @@
85418554
6134CDB12A691E850061CCD9 /* BatchMetricsTests.swift in Sources */,
85428555
D24C9C6029A7CB0A002057CF /* DatadogLogsFeatureTests.swift in Sources */,
85438556
617B953D24BF4D8F00E6F443 /* RUMMonitorTests.swift in Sources */,
8557+
861FD6862DF2EAED00F59823 /* LocaleInfoPublisherTests.swift in Sources */,
85448558
D244B3A3271EDACD003E1B29 /* SwiftUIExtensionsTests.swift in Sources */,
85458559
D24C9C6429A7CB7B002057CF /* CrashLogReceiverTests.swift in Sources */,
85468560
61B5E42126DF85C7000B0A5F /* DDRUMMonitor+apiTests.m in Sources */,
@@ -9010,6 +9024,7 @@
90109024
D295A16529F299C9007C0E9A /* URLSessionInterceptor.swift in Sources */,
90119025
3C08F9D02C2D652D002B0FF2 /* Storage.swift in Sources */,
90129026
D23039E5298D5236001A1FA3 /* DateProvider.swift in Sources */,
9027+
861FD6892DF3366400F59823 /* LocaleInfo.swift in Sources */,
90139028
D23039E0298D5235001A1FA3 /* DatadogCoreProtocol.swift in Sources */,
90149029
D23039FD298D5236001A1FA3 /* DataCompression.swift in Sources */,
90159030
D2C179E12DD2388800556F68 /* SpanCoreContext.swift in Sources */,
@@ -9792,6 +9807,7 @@
97929807
D2CB6E8127C50EAE00A62B57 /* DataUploader.swift in Sources */,
97939808
D2CB6E8827C50EAE00A62B57 /* FileReader.swift in Sources */,
97949809
D2CB6E8D27C50EAE00A62B57 /* KronosNTPProtocol.swift in Sources */,
9810+
86B43EC72DE464ED00FDDD29 /* LocaleInfoPublisher.swift in Sources */,
97959811
D2CB6E9127C50EAE00A62B57 /* KronosTimeFreeze.swift in Sources */,
97969812
D2FB125E292FBB56005B13F8 /* Datadog+Internal.swift in Sources */,
97979813
61DA8CAA28609C5B0074A606 /* Directories.swift in Sources */,
@@ -9904,6 +9920,7 @@
99049920
D22743EC29DEC9E6001A7EF9 /* Casting+RUM.swift in Sources */,
99059921
D2CB6F4D27C520D400A62B57 /* DataUploadStatusTests.swift in Sources */,
99069922
D2CB6F4F27C520D400A62B57 /* RetryingTests.swift in Sources */,
9923+
861FD6852DF2EAED00F59823 /* LocaleInfoPublisherTests.swift in Sources */,
99079924
A7CA21812BEBB1E800732571 /* AppBackgroundTaskCoordinatorTests.swift in Sources */,
99089925
D2CB6F5027C520D400A62B57 /* DDDatadogTests.swift in Sources */,
99099926
D2B3F0452823EE8400C2B5EE /* TLVBlockTests.swift in Sources */,
@@ -10115,6 +10132,7 @@
1011510132
3C08F9D12C2D652D002B0FF2 /* Storage.swift in Sources */,
1011610133
D2DA237B298D57AA00C6C7E6 /* DateProvider.swift in Sources */,
1011710134
D2DA237C298D57AA00C6C7E6 /* DatadogCoreProtocol.swift in Sources */,
10135+
861FD6882DF3366400F59823 /* LocaleInfo.swift in Sources */,
1011810136
D2DA237D298D57AA00C6C7E6 /* DataCompression.swift in Sources */,
1011910137
D2C9A26A2C0F3F5A007526F5 /* SessionReplayConfiguration.swift in Sources */,
1012010138
D2C179E22DD2388800556F68 /* SpanCoreContext.swift in Sources */,
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/*
2+
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
3+
* This product includes software developed at Datadog (https://www.datadoghq.com/).
4+
* Copyright 2019-Present Datadog, Inc.
5+
*/
6+
7+
import Foundation
8+
import DatadogInternal
9+
10+
/// The locale publisher will publish an updated ``LocaleInfo`` value with current locale properties
11+
/// by observing the `NSCurrentLocaleDidChangeNotification` notification on the given
12+
/// notification center.
13+
internal final class LocaleInfoPublisher: ContextValuePublisher {
14+
let initialValue: LocaleInfo
15+
16+
private let notificationCenter: NotificationCenter
17+
private var observer: Any?
18+
19+
/// Creates a locale info publisher that updates locale information.
20+
///
21+
/// - Parameters:
22+
/// - initialLocale: The initial locale info.
23+
/// - notificationCenter: The notification center for observing the `NSCurrentLocaleDidChangeNotification`.
24+
init(initialLocale: LocaleInfo, notificationCenter: NotificationCenter) {
25+
self.initialValue = initialLocale
26+
self.notificationCenter = notificationCenter
27+
}
28+
29+
func publish(to receiver: @escaping ContextValueReceiver<LocaleInfo>) {
30+
self.observer = notificationCenter
31+
.addObserver(
32+
forName: NSLocale.currentLocaleDidChangeNotification,
33+
object: nil,
34+
queue: .main
35+
) { _ in
36+
let updatedLocale = LocaleInfo()
37+
receiver(updatedLocale)
38+
}
39+
}
40+
41+
func cancel() {
42+
observer.map(notificationCenter.removeObserver)
43+
}
44+
}

DatadogCore/Sources/Core/DatadogCore.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,7 @@ extension DatadogContextProvider {
474474
applicationVersion: String,
475475
sdkInitDate: Date,
476476
device: DeviceInfo,
477+
locale: LocaleInfo,
477478
processInfo: ProcessInfo,
478479
dateProvider: DateProvider,
479480
serverDateProvider: ServerDateProvider,
@@ -498,6 +499,7 @@ extension DatadogContextProvider {
498499
applicationBundleType: applicationBundleType,
499500
sdkInitDate: dateProvider.now,
500501
device: device,
502+
localeInfo: locale,
501503
nativeSourceOverride: nativeSourceOverride,
502504
launchTime: appLaunchHandler.currentValue,
503505
// this is a placeholder waiting for the `ApplicationStatePublisher`
@@ -525,6 +527,8 @@ extension DatadogContextProvider {
525527
subscribe(\.isLowPowerModeEnabled, to: LowPowerModePublisher(notificationCenter: notificationCenter, processInfo: processInfo))
526528
#endif
527529

530+
subscribe(\.localeInfo, to: LocaleInfoPublisher(initialLocale: LocaleInfo(), notificationCenter: notificationCenter))
531+
528532
#if os(iOS) || os(tvOS)
529533
DispatchQueue.main.async {
530534
// must be call on the main thread to read `UIApplication.State`

DatadogCore/Sources/Datadog.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,7 @@ extension DatadogCore {
630630
applicationVersion: applicationVersion,
631631
sdkInitDate: configuration.dateProvider.now,
632632
device: DeviceInfo(processInfo: configuration.processInfo),
633+
locale: LocaleInfo(),
633634
processInfo: configuration.processInfo,
634635
dateProvider: configuration.dateProvider,
635636
serverDateProvider: configuration.serverDateProvider,
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
/*
2+
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
3+
* This product includes software developed at Datadog (https://www.datadoghq.com/).
4+
* Copyright 2019-Present Datadog, Inc.
5+
*/
6+
7+
import XCTest
8+
import DatadogInternal
9+
import TestUtilities
10+
@testable import DatadogCore
11+
12+
class LocaleInfoPublisherTests: XCTestCase {
13+
private let notificationCenter = NotificationCenter()
14+
15+
func testPublishLocaleInfo() throws {
16+
let expectation = self.expectation(description: "Locale info published")
17+
18+
// Given
19+
let initialLocale = LocaleInfo(
20+
locales: ["en-US"],
21+
currentLocale: "en-US",
22+
timeZoneIdentifier: "UTC"
23+
)
24+
let publisher = LocaleInfoPublisher(initialLocale: initialLocale, notificationCenter: notificationCenter)
25+
26+
// When
27+
publisher.publish { locale in
28+
// Then
29+
XCTAssertEqual(locale.locales, Locale.preferredLanguages)
30+
XCTAssertEqual(locale.currentLocale, Locale.current.identifier.replacingOccurrences(of: "_", with: "-"))
31+
XCTAssertEqual(locale.timeZoneIdentifier, TimeZone.current.identifier)
32+
33+
expectation.fulfill()
34+
}
35+
36+
notificationCenter.post(name: NSLocale.currentLocaleDidChangeNotification, object: nil)
37+
38+
waitForExpectations(timeout: 1.0)
39+
publisher.cancel()
40+
}
41+
42+
func testUpdatesLocaleInfoWhenLocaleChanges() throws {
43+
let expectation = self.expectation(description: "Locale info updated on locale change")
44+
expectation.expectedFulfillmentCount = 2
45+
46+
// Given
47+
let initialLocale = LocaleInfo(
48+
locales: ["en-US"],
49+
currentLocale: "en-US",
50+
timeZoneIdentifier: "UTC"
51+
)
52+
let publisher = LocaleInfoPublisher(initialLocale: initialLocale, notificationCenter: notificationCenter)
53+
54+
var receivedLocaleInfos: [LocaleInfo] = []
55+
56+
// When
57+
publisher.publish { locale in
58+
receivedLocaleInfos.append(locale)
59+
expectation.fulfill()
60+
}
61+
62+
// First notification should trigger the receiver
63+
notificationCenter.post(name: NSLocale.currentLocaleDidChangeNotification, object: nil)
64+
65+
// Second notification should also trigger the receiver
66+
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
67+
self.notificationCenter.post(name: NSLocale.currentLocaleDidChangeNotification, object: nil)
68+
}
69+
70+
waitForExpectations(timeout: 2.0)
71+
72+
// Then
73+
XCTAssertEqual(receivedLocaleInfos.count, 2)
74+
75+
for localeInfo in receivedLocaleInfos {
76+
XCTAssertEqual(localeInfo.locales, Locale.preferredLanguages)
77+
XCTAssertEqual(localeInfo.currentLocale, Locale.current.identifier.replacingOccurrences(of: "_", with: "-"))
78+
XCTAssertEqual(localeInfo.timeZoneIdentifier, TimeZone.current.identifier)
79+
}
80+
81+
publisher.cancel()
82+
}
83+
}

DatadogInternal/Sources/Context/DatadogContext.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ public struct DatadogContext {
7171
/// Current device information.
7272
public var device: DeviceInfo
7373

74+
/// Current locale information.
75+
public var localeInfo: LocaleInfo
76+
7477
/// Current user information.
7578
public var userInfo: UserInfo?
7679

@@ -132,6 +135,7 @@ public struct DatadogContext {
132135
applicationBundleType: BundleType,
133136
sdkInitDate: Date,
134137
device: DeviceInfo,
138+
localeInfo: LocaleInfo,
135139
nativeSourceOverride: String? = nil,
136140
userInfo: UserInfo? = nil,
137141
accountInfo: AccountInfo? = nil,
@@ -161,6 +165,7 @@ public struct DatadogContext {
161165
self.applicationBundleType = applicationBundleType
162166
self.sdkInitDate = sdkInitDate
163167
self.device = device
168+
self.localeInfo = localeInfo
164169
self.nativeSourceOverride = nativeSourceOverride
165170
self.userInfo = userInfo
166171
self.accountInfo = accountInfo

DatadogInternal/Sources/Context/DeviceInfo.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ extension DeviceInfo {
167167
#endif
168168
}
169169
}
170+
170171
#elseif os(macOS)
171172
/// Creates device info based on Host description.
172173
///
@@ -207,6 +208,7 @@ extension DeviceInfo {
207208
)
208209
}
209210
}
211+
210212
#endif
211213

212214
#if canImport(WatchKit)
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*
2+
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
3+
* This product includes software developed at Datadog (https://www.datadoghq.com/).
4+
* Copyright 2019-Present Datadog, Inc.
5+
*/
6+
7+
import Foundation
8+
9+
/// Describes current locale information.
10+
public struct LocaleInfo: Codable, Equatable {
11+
/// Device locale(s) - list of preferred languages set by the user in system settings, in order of priority
12+
public let locales: [String]
13+
14+
/// Current Locale (language + region) - active locale that influences system formatting (e.g. "en-US")
15+
public let currentLocale: String
16+
17+
/// Time zone identifier (e.g. "Europe/Berlin")
18+
public let timeZoneIdentifier: String
19+
20+
public init(
21+
locales: [String],
22+
currentLocale: String,
23+
timeZoneIdentifier: String
24+
) {
25+
self.locales = locales
26+
self.currentLocale = currentLocale
27+
self.timeZoneIdentifier = timeZoneIdentifier
28+
}
29+
}
30+
31+
extension LocaleInfo {
32+
/// Creates locale info with current system values.
33+
public init() {
34+
self.init(
35+
locales: Locale.preferredLanguages,
36+
currentLocale: Locale.current.identifier.replacingOccurrences(of: "_", with: "-"),
37+
timeZoneIdentifier: TimeZone.current.identifier
38+
)
39+
}
40+
}

DatadogInternal/Sources/Models/CrashReporting/CrashContext.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ public struct CrashContext: Codable, Equatable {
3535
/// Current device information.
3636
public let device: DeviceInfo
3737

38+
/// Current locale information.
39+
public let localeInfo: LocaleInfo
40+
3841
/// The version of Datadog iOS SDK.
3942
public let sdkVersion: String
4043

@@ -89,6 +92,7 @@ public struct CrashContext: Codable, Equatable {
8992
version: String,
9093
buildNumber: String,
9194
device: DeviceInfo,
95+
localeInfo: LocaleInfo,
9296
sdkVersion: String,
9397
source: String,
9498
trackingConsent: TrackingConsent,
@@ -109,6 +113,7 @@ public struct CrashContext: Codable, Equatable {
109113
self.version = version
110114
self.buildNumber = buildNumber
111115
self.device = device
116+
self.localeInfo = localeInfo
112117
self.sdkVersion = service
113118
self.source = source
114119
self.trackingConsent = trackingConsent
@@ -137,6 +142,7 @@ public struct CrashContext: Codable, Equatable {
137142
self.version = context.version
138143
self.buildNumber = context.buildNumber
139144
self.device = context.device
145+
self.localeInfo = context.localeInfo
140146
self.sdkVersion = context.sdkVersion
141147
self.source = context.source
142148
self.trackingConsent = context.trackingConsent

0 commit comments

Comments
 (0)