-
-
Notifications
You must be signed in to change notification settings - Fork 338
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
62 changed files
with
2,856 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,3 +74,6 @@ yalc.lock | |
|
||
# E2E tests | ||
test/react-native/versions | ||
|
||
# Created by Sentry Metro Plugin | ||
.sentry/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,31 @@ | |
|
||
## Unreleased | ||
|
||
### Features | ||
|
||
- Redact `react-native-svg` SVGs when `maskAllVectors` ([#3930](https://github.com/getsentry/sentry-react-native/pull/3930)) | ||
- Add `annotateReactComponents` option to `@sentry/react-native/metro` ([#3916](https://github.com/getsentry/sentry-react-native/pull/3916)) | ||
|
||
```js | ||
// For Expo | ||
const { getSentryExpoConfig } = require("@sentry/react-native/metro"); | ||
const config = getSentryExpoConfig(__dirname, { annotateReactComponents: true }); | ||
|
||
// For RN | ||
const { getDefaultConfig } = require('@react-native/metro-config'); | ||
const { withSentryConfig } = require('@sentry/react-native/metro'); | ||
module.exports = withSentryConfig(getDefaultConfig(__dirname), { annotateReactComponents: true }); | ||
``` | ||
|
||
### Fixes | ||
|
||
- Add `app.foreground/background` breadcrumbs to iOS Replays ([#3932](https://github.com/getsentry/sentry-react-native/pull/3932)) | ||
|
||
### Dependencies | ||
|
||
- Bump Android SDK from v7.11.0-alpha.2 to v7.12.0-alpha.4 ([#3830](https://github.com/getsentry/sentry-react-native/pull/3830)) | ||
- [changelog](https://github.com/getsentry/sentry-java/blob/7.12.0-alpha.3/CHANGELOG.md#7120-alpha4) | ||
- [diff](https://github.com/getsentry/sentry-java/compare/7.11.0-alpha.2...7.12.0-alpha.4) | ||
- Bump Cocoa SDK from v8.30.0 to v8.30.1 ([#3936](https://github.com/getsentry/sentry-react-native/pull/3936)) | ||
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8301) | ||
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.30.0...8.30.1) | ||
|
@@ -31,6 +54,30 @@ | |
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#7110) | ||
- [diff](https://github.com/getsentry/sentry-java/compare/7.10.0...7.11.0) | ||
|
||
## 5.25.0-alpha.2 | ||
|
||
### Features | ||
|
||
- Improve touch event component info if annotated with [`@sentry/babel-plugin-component-annotate`](https://www.npmjs.com/package/@sentry/babel-plugin-component-annotate) ([#3899](https://github.com/getsentry/sentry-react-native/pull/3899)) | ||
- Add replay breadcrumbs for touch & navigation events ([#3846](https://github.com/getsentry/sentry-react-native/pull/3846)) | ||
- Add network data to Session Replays ([#3912](https://github.com/getsentry/sentry-react-native/pull/3912)) | ||
- Filter Sentry Event Breadcrumbs from Mobile Replays ([#3925](https://github.com/getsentry/sentry-react-native/pull/3925)) | ||
|
||
### Fixes | ||
|
||
- `sentry-expo-upload-sourcemaps` no longer requires Sentry url when uploading sourcemaps to `sentry.io` ([#3915](https://github.com/getsentry/sentry-react-native/pull/3915)) | ||
|
||
### Dependencies | ||
|
||
- Bump Cocoa SDK from v8.25.0-alpha.0 to v8.30.0 ([#3914](https://github.com/getsentry/sentry-react-native/pull/3914)) | ||
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8300) | ||
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.25.0-alpha.0...8.30.0) | ||
- Bump Android SDK from v7.9.0-alpha.1 to v7.11.0-alpha.2 ([#3830](https://github.com/getsentry/sentry-react-native/pull/3830)) | ||
- [changelog](https://github.com/getsentry/sentry-java/blob/7.11.0-alpha.2/CHANGELOG.md#7110-alpha2) | ||
- [diff](https://github.com/getsentry/sentry-java/compare/7.9.0-alpha.1...7.11.0-alpha.2) | ||
|
||
Access to Mobile Replay is limited to early access orgs on Sentry. If you're interested, [sign up for the waitlist](https://sentry.io/lp/mobile-replay-beta/) | ||
|
||
## 5.24.1 | ||
|
||
### Fixes | ||
|
@@ -130,6 +177,14 @@ This release does *not* build on iOS. Please use `5.23.1` or newer. | |
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8270) | ||
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.26.0...8.27.0) | ||
|
||
## 5.23.0-alpha.1 | ||
|
||
### Fixes | ||
|
||
- Pass `replaysSessionSampleRate` option to Android ([#3714](https://github.com/getsentry/sentry-react-native/pull/3714)) | ||
|
||
Access to Mobile Replay is limited to early access orgs on Sentry. If you're interested, [sign up for the waitlist](https://sentry.io/lp/mobile-replay-beta/) | ||
|
||
## 5.22.3 | ||
|
||
### Fixes | ||
|
@@ -163,6 +218,47 @@ This release does *not* build on iOS. Please use `5.23.1` or newer. | |
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8250) | ||
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.24.0...8.25.0) | ||
|
||
## 5.23.0-alpha.0 | ||
|
||
### Features | ||
|
||
- Mobile Session Replay Alpha ([#3714](https://github.com/getsentry/sentry-react-native/pull/3714)) | ||
|
||
To enable Replay for React Native on mobile and web add the following options. | ||
|
||
```js | ||
Sentry.init({ | ||
_experiments: { | ||
replaysSessionSampleRate: 1.0, | ||
replaysOnErrorSampleRate: 1.0, | ||
}, | ||
}); | ||
``` | ||
|
||
To change the default Mobile Replay options add the `mobileReplayIntegration`. | ||
|
||
```js | ||
Sentry.init({ | ||
_experiments: { | ||
replaysSessionSampleRate: 1.0, | ||
replaysOnErrorSampleRate: 1.0, | ||
}, | ||
integration: [ | ||
Sentry.mobileReplayIntegration({ | ||
maskAllText: true, | ||
maskAllImages: true, | ||
}), | ||
], | ||
}); | ||
``` | ||
|
||
Access is limited to early access orgs on Sentry. If you're interested, [sign up for the waitlist](https://sentry.io/lp/mobile-replay-beta/) | ||
|
||
### Dependencies | ||
|
||
- Bump Cocoa SDK to [8.25.0-alpha.0](https://github.com/getsentry/sentry-cocoa/releases/tag/8.25.0-alpha.0) | ||
- Bump Android SDK to [7.9.0-alpha.1](https://github.com/getsentry/sentry-java/releases/tag/7.9.0-alpha.1) | ||
|
||
## 5.22.0 | ||
|
||
### Features | ||
|
@@ -441,7 +537,7 @@ see [the Expo guide](https://docs.sentry.io/platforms/react-native/manual-setup/ | |
const { getSentryExpoConfig } = require("@sentry/react-native/metro"); | ||
|
||
// const config = getDefaultConfig(__dirname); | ||
const config = getSentryExpoConfig(config, {}); | ||
const config = getSentryExpoConfig(__dirname); | ||
``` | ||
|
||
- New `npx sentry-expo-upload-sourcemaps` for simple EAS Update (`npx expo export`) source maps upload ([#3491](https://github.com/getsentry/sentry-react-native/pull/3491), [#3510](https://github.com/getsentry/sentry-react-native/pull/3510), [#3515](https://github.com/getsentry/sentry-react-native/pull/3515), [#3507](https://github.com/getsentry/sentry-react-native/pull/3507)) | ||
|
@@ -673,7 +769,7 @@ This release is compatible with `[email protected]` and newer. | |
}); | ||
``` | ||
|
||
Read more at https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md#7690 | ||
Read more at <https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md#7690> | ||
|
||
- Report current screen in `contexts.app.view_names` ([#3339](https://github.com/getsentry/sentry-react-native/pull/3339)) | ||
|
||
|
@@ -2712,7 +2808,7 @@ We are looking into ways making this more stable and plan to re-enable it again | |
|
||
## v0.23.2 | ||
|
||
- Fixed #228 again ¯\\_(ツ)_/¯ | ||
- Fixed #228 again ¯\\*(ツ)*/¯ | ||
|
||
## v0.23.1 | ||
|
||
|
99 changes: 99 additions & 0 deletions
99
...pp/src/test/java/io/sentry/rnsentryandroidtester/RNSentryReplayBreadcrumbConverterTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
package io.sentry.rnsentryandroidtester | ||
|
||
import io.sentry.Breadcrumb | ||
import io.sentry.react.RNSentryReplayBreadcrumbConverter | ||
import io.sentry.rrweb.RRWebBreadcrumbEvent | ||
import org.junit.Assert.assertEquals | ||
import org.junit.Test | ||
import org.junit.runner.RunWith | ||
import org.junit.runners.JUnit4 | ||
|
||
@RunWith(JUnit4::class) | ||
class RNSentryReplayBreadcrumbConverterTest { | ||
|
||
@Test | ||
fun testConvertForegroundBreadcrumb() { | ||
val converter = RNSentryReplayBreadcrumbConverter() | ||
val testBreadcrumb = Breadcrumb() | ||
testBreadcrumb.type = "navigation" | ||
testBreadcrumb.category = "app.lifecycle" | ||
testBreadcrumb.setData("state", "foreground"); | ||
val actual = converter.convert(testBreadcrumb) as RRWebBreadcrumbEvent | ||
|
||
assertEquals("app.foreground", actual.category) | ||
} | ||
|
||
@Test | ||
fun testConvertBackgroundBreadcrumb() { | ||
val converter = RNSentryReplayBreadcrumbConverter() | ||
val testBreadcrumb = Breadcrumb() | ||
testBreadcrumb.type = "navigation" | ||
testBreadcrumb.category = "app.lifecycle" | ||
testBreadcrumb.setData("state", "background"); | ||
val actual = converter.convert(testBreadcrumb) as RRWebBreadcrumbEvent | ||
|
||
assertEquals("app.background", actual.category) | ||
} | ||
|
||
@Test | ||
fun doesNotConvertSentryEventBreadcrumb() { | ||
val converter = RNSentryReplayBreadcrumbConverter() | ||
val testBreadcrumb = Breadcrumb(); | ||
testBreadcrumb.category = "sentry.event" | ||
val actual = converter.convert(testBreadcrumb) | ||
assertEquals(null, actual) | ||
} | ||
|
||
@Test | ||
fun doesNotConvertSentryTransactionBreadcrumb() { | ||
val converter = RNSentryReplayBreadcrumbConverter() | ||
val testBreadcrumb = Breadcrumb(); | ||
testBreadcrumb.category = "sentry.transaction" | ||
val actual = converter.convert(testBreadcrumb) | ||
assertEquals(null, actual) | ||
} | ||
|
||
@Test | ||
fun doesNotConvertNullPath() { | ||
val actual = RNSentryReplayBreadcrumbConverter.getTouchPathMessage(null) | ||
assertEquals(null, actual) | ||
} | ||
|
||
@Test | ||
fun doesNotConvertPathContainingNull() { | ||
val actual = RNSentryReplayBreadcrumbConverter.getTouchPathMessage(arrayListOf(arrayOfNulls<Any>(1))) | ||
assertEquals(null, actual) | ||
} | ||
|
||
@Test | ||
fun doesNotConvertPathWithValuesMissingNameAndLevel() { | ||
val actual = RNSentryReplayBreadcrumbConverter.getTouchPathMessage(arrayListOf(mapOf( | ||
"element" to "element4", | ||
"file" to "file4"))) | ||
assertEquals(null, actual) | ||
} | ||
|
||
@Test | ||
fun doesConvertValidPathExample1() { | ||
val actual = RNSentryReplayBreadcrumbConverter.getTouchPathMessage(listOf( | ||
mapOf("label" to "label0"), | ||
mapOf("name" to "name1"), | ||
mapOf("name" to "item2", "label" to "label2"), | ||
mapOf("name" to "item3", "label" to "label3", "element" to "element3"), | ||
mapOf("name" to "item4", "label" to "label4", "file" to "file4"), | ||
mapOf("name" to "item5", "label" to "label5", "element" to "element5", "file" to "file5"))) | ||
assertEquals("label3(element3) > label2 > name1 > label0", actual) | ||
} | ||
|
||
@Test | ||
fun doesConvertValidPathExample2() { | ||
val actual = RNSentryReplayBreadcrumbConverter.getTouchPathMessage(listOf( | ||
mapOf("name" to "item2", "label" to "label2"), | ||
mapOf("name" to "item3", "label" to "label3", "element" to "element3"), | ||
mapOf("name" to "item4", "label" to "label4", "file" to "file4"), | ||
mapOf("name" to "item5", "label" to "label5", "element" to "element5", "file" to "file5"), | ||
mapOf("label" to "label6"), | ||
mapOf("name" to "name7"))) | ||
assertEquals("label5(element5, file5) > label4(file4) > label3(element3) > label2", actual) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
RNSentryCocoaTester/RNSentryCocoaTesterTests/RNSentryCocoaTesterTests-Bridging-Header.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
// | ||
// Use this file to import your target's public headers that you would like to expose to Swift. | ||
// | ||
|
||
#import "RNSentryReplayBreadcrumbConverter.h" | ||
#import "RNSentryBreadcrumb.h" |
Oops, something went wrong.