File tree 2 files changed +20
-0
lines changed 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change 2
2
3
3
## Unreleased
4
4
5
+ ### Features
6
+
7
+ - Add CPU Info to Device Context ([ #2984 ] ( https://github.com/getsentry/sentry-react-native/pull/2984 ) )
8
+
5
9
### Fixes
6
10
7
11
- Allow disabling native on RNNA ([ #2978 ] ( https://github.com/getsentry/sentry-react-native/pull/2978 ) )
Original file line number Diff line number Diff line change @@ -207,6 +207,22 @@ - (void)setEventEnvironmentTag:(SentryEvent *)event
207
207
}
208
208
}];
209
209
210
+ NSDictionary <NSString *, id > *extraContext = [PrivateSentrySDKOnly getExtraContext ];
211
+ NSMutableDictionary <NSString *, NSDictionary <NSString *, id > *> *context = [contexts[@" context" ] mutableCopy ];
212
+
213
+ if (extraContext && [extraContext[@" device" ] isKindOfClass: [NSDictionary class ]]) {
214
+ NSMutableDictionary <NSString *, NSDictionary <NSString *, id > *> *deviceContext = [contexts[@" context" ][@" device" ] mutableCopy ];
215
+ [deviceContext addEntriesFromDictionary: extraContext[@" device" ]];
216
+ [context setValue: deviceContext forKey: @" device" ];
217
+ }
218
+
219
+ if (extraContext && [extraContext[@" app" ] isKindOfClass: [NSDictionary class ]]) {
220
+ NSMutableDictionary <NSString *, NSDictionary <NSString *, id > *> *appContext = [contexts[@" context" ][@" app" ] mutableCopy ];
221
+ [appContext addEntriesFromDictionary: extraContext[@" app" ]];
222
+ [context setValue: appContext forKey: @" app" ];
223
+ }
224
+
225
+ [contexts setValue: context forKey: @" context" ];
210
226
resolve (contexts);
211
227
}
212
228
You can’t perform that action at this time.
0 commit comments