File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change 22
33## Unreleased
44
5+ ### Features
6+
7+ - Add CPU Info to Device Context ([ #2984 ] ( https://github.com/getsentry/sentry-react-native/pull/2984 ) )
8+
59### Fixes
610
711- 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
207207 }
208208 }];
209209
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" ];
210226 resolve (contexts);
211227}
212228
You can’t perform that action at this time.
0 commit comments