diff --git a/CHANGELOG.md b/CHANGELOG.md index 564bdbe63b..078ce361eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,11 @@ ## Unreleased +### Features + +- Report the generation of the cellular network technology in `device.connection_effective_type` on Android and iOS, for example `4g` or `5g` ([#6827](https://github.com/getsentry/sentry-react-native/pull/6827)) + - On Android 11 and earlier, the app must have the `READ_PHONE_STATE` permission. The SDK does not request this permission. + ### Fixes - Fix stale `turbo_module.*` tags on Android native crashes ([#6823](https://github.com/getsentry/sentry-react-native/pull/6823)) diff --git a/packages/core/test/integrations/devicecontext.test.ts b/packages/core/test/integrations/devicecontext.test.ts index fd5352a143..2388786537 100644 --- a/packages/core/test/integrations/devicecontext.test.ts +++ b/packages/core/test/integrations/devicecontext.test.ts @@ -93,6 +93,19 @@ describe('Device Context Integration', () => { }); }); + it('adds the native connection type and technology to the device context', async () => { + const { processedEvent } = await processEventWith({ + nativeContexts: { + contexts: { device: { connection_type: 'cellular', connection_effective_type: '5g' } }, + }, + }); + expect(processedEvent).toStrictEqual({ + contexts: { + device: { connection_type: 'cellular', connection_effective_type: '5g' }, + }, + }); + }); + it('merge native tags', async () => { const { processedEvent } = await processEventWith({ nativeContexts: { tags: { duplicate: 'native-tag', native: 'tag' } }, diff --git a/samples/react-native/e2e/tests/captureMessage/captureMessage.test.ios.ts b/samples/react-native/e2e/tests/captureMessage/captureMessage.test.ios.ts index 7ff741cba1..f0be0fcad3 100644 --- a/samples/react-native/e2e/tests/captureMessage/captureMessage.test.ios.ts +++ b/samples/react-native/e2e/tests/captureMessage/captureMessage.test.ios.ts @@ -58,6 +58,7 @@ describe('Capture message', () => { contexts: expect.objectContaining({ device: expect.objectContaining({ arch: expect.any(String), + connection_type: expect.any(String), family: expect.any(String), free_memory: expect.any(Number), locale: expect.any(String),