Skip to content

Commit 8aa1902

Browse files
committed
Merge branch 'v8' into antonis/capture-app-start-errors-v8
# Conflicts: # samples/react-native/android/app/build.gradle
2 parents 1ad8373 + db9c1a8 commit 8aa1902

33 files changed

Lines changed: 686 additions & 139 deletions

File tree

CHANGELOG.md

Lines changed: 49 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,36 @@
22

33
<!-- prettier-ignore-start -->
44
> [!IMPORTANT]
5-
> If you are upgrading to the `7.x` versions of the Sentry React Native SDK from `6.x` or below,
5+
> If you are upgrading to the `8.x` versions of the Sentry React Native SDK from `7.x` or below,
66
> make sure you follow our [migration guide](https://docs.sentry.io/platforms/react-native/migration/) first.
77
<!-- prettier-ignore-end -->
88
9-
## Unreleased
9+
### Unreleased
1010

11-
### Features
11+
### Upgrading from 7.x to 8.0
1212

13-
- Add experimental `sentry-span-attributes` prop to attach custom attributes to user interaction spans ([#5569](https://github.com/getsentry/sentry-react-native/pull/5569))
14-
```tsx
15-
<Pressable
16-
sentry-label="checkout"
17-
sentry-span-attributes={{
18-
'user.type': 'premium',
19-
'cart.value': 150
20-
}}
21-
onPress={handleCheckout}>
22-
<Text>Checkout</Text>
23-
</Pressable>
24-
```
13+
Version 8 of the Sentry React Native SDK updates the underlying native SDKs (Cocoa v9, CLI v3, Android Gradle Plugin v6) which introduce breaking changes in minimum version requirements and build tooling.
14+
15+
See our [migration docs](https://docs.sentry.io/platforms/react-native/migration/v7-to-v8/) for more information.
16+
17+
### Breaking Changes
18+
19+
#### Minimum Version Requirements
20+
21+
- **iOS/macOS/tvOS**: ([#5356](https://github.com/getsentry/sentry-react-native/pull/5356))
22+
- iOS **15.0+** (previously 11.0+)
23+
- macOS **10.14+** (previously 10.13+)
24+
- tvOS **15.0+** (previously 11.0+)
25+
26+
- **Android**: ([#5578](https://github.com/getsentry/sentry-react-native/pull/5578))
27+
- Sentry Android Gradle Plugin **6.0.0** (previously 5.x)
28+
- Android Gradle Plugin **7.4.0+** (previously 7.3.0+)
29+
- Kotlin **1.8+**
30+
31+
- **Sentry Self-Hosted**: ([#5523](https://github.com/getsentry/sentry-react-native/pull/5523))
32+
- Sentry CLI v3 requires self-hosted **25.11.1+** (previously 25.2.0)
33+
34+
### Features
2535

2636
- Capture App Start errors and crashes by initializing Sentry from `sentry.options.json` ([#4472](https://github.com/getsentry/sentry-react-native/pull/4472))
2737

@@ -98,9 +108,33 @@
98108
- Bump CLI from v2.58.4 to v3.1.0 ([#5523](https://github.com/getsentry/sentry-react-native/pull/5523), [#5471](https://github.com/getsentry/sentry-react-native/pull/5471), [#5514](https://github.com/getsentry/sentry-react-native/pull/5514), [#5502](https://github.com/getsentry/sentry-react-native/pull/5502))
99109
- [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#310)
100110
- [diff](https://github.com/getsentry/sentry-cli/compare/2.58.4...3.1.0)
111+
112+
## 7.11.0
113+
114+
### Features
115+
116+
- Add support for applying scope attributes to JS logs ([#5579](https://github.com/getsentry/sentry-react-native/pull/5579))
117+
- Add experimental `sentry-span-attributes` prop to attach custom attributes to user interaction spans ([#5569](https://github.com/getsentry/sentry-react-native/pull/5569))
118+
```tsx
119+
<Pressable
120+
sentry-label="checkout"
121+
sentry-span-attributes={{
122+
'user.type': 'premium',
123+
'cart.value': 150
124+
}}
125+
onPress={handleCheckout}>
126+
<Text>Checkout</Text>
127+
</Pressable>
128+
```
129+
130+
### Dependencies
131+
101132
- Bump Bundler Plugins from v4.7.0 to v4.8.0 ([#5581](https://github.com/getsentry/sentry-react-native/pull/5581))
102133
- [changelog](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/main/CHANGELOG.md#480)
103134
- [diff](https://github.com/getsentry/sentry-javascript-bundler-plugins/compare/4.7.0...4.8.0)
135+
- Bump JavaScript SDK from v10.36.0 to v10.37.0 ([#5589](https://github.com/getsentry/sentry-react-native/pull/5589))
136+
- [changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md#10370)
137+
- [diff](https://github.com/getsentry/sentry-javascript/compare/10.36.0...10.37.0)
104138

105139
## 7.10.0
106140

dev-packages/e2e-tests/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sentry-react-native-e2e-tests",
3-
"version": "7.10.0",
3+
"version": "7.11.0",
44
"private": true,
55
"description": "Sentry React Native End to End Tests Library",
66
"main": "dist/index.js",
@@ -13,8 +13,8 @@
1313
"devDependencies": {
1414
"@babel/preset-env": "^7.25.3",
1515
"@babel/preset-typescript": "^7.18.6",
16-
"@sentry/core": "10.36.0",
17-
"@sentry/react-native": "7.10.0",
16+
"@sentry/core": "10.37.0",
17+
"@sentry/react-native": "7.11.0",
1818
"@types/node": "^20.9.3",
1919
"@types/react": "^18.2.64",
2020
"appium": "2.4.1",

dev-packages/type-check/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "sentry-react-native-type-check",
33
"private": true,
4-
"version": "7.10.0",
4+
"version": "7.11.0",
55
"scripts": {
66
"type-check": "./run-type-check.sh"
77
}

dev-packages/utils/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sentry-react-native-samples-utils",
3-
"version": "7.10.0",
3+
"version": "7.11.0",
44
"description": "Internal Samples Utils",
55
"main": "index.js",
66
"license": "MIT",

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
3-
"version": "7.10.0",
3+
"version": "7.11.0",
44
"packages": [
55
"packages/*",
66
"dev-packages/*",

packages/core/android/src/main/java/io/sentry/react/RNSentryModuleImpl.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,26 @@ public void setTag(String key, String value) {
582582
});
583583
}
584584

585+
public void setAttribute(String key, String value) {
586+
// TODO(alwx): This is not implemented in sentry-android yet
587+
/*
588+
* Sentry.configureScope(
589+
* scope -> {
590+
* scope.setAttribute(key, value);
591+
* });
592+
*/
593+
}
594+
595+
public void setAttributes(ReadableMap attributes) {
596+
// TODO(alwx): This is not implemented in sentry-android yet
597+
/*
598+
* Sentry.configureScope(
599+
* scope -> {
600+
* scope.setAttributes(attributes);
601+
* });
602+
*/
603+
}
604+
585605
public void closeNativeSdk(Promise promise) {
586606
Sentry.close();
587607

packages/core/android/src/main/java/io/sentry/react/RNSentryVersion.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
class RNSentryVersion {
44
static final String REACT_NATIVE_SDK_PACKAGE_NAME = "npm:@sentry/react-native";
5-
static final String REACT_NATIVE_SDK_PACKAGE_VERSION = "7.10.0";
5+
static final String REACT_NATIVE_SDK_PACKAGE_VERSION = "7.11.0";
66
static final String NATIVE_SDK_NAME = "sentry.native.android.react-native";
77
static final String ANDROID_SDK_NAME = "sentry.java.android.react-native";
88
static final String REACT_NATIVE_SDK_NAME = "sentry.javascript.react-native";

packages/core/android/src/newarch/java/io/sentry/react/RNSentryModule.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,16 @@ public void setTag(String key, String value) {
112112
this.impl.setTag(key, value);
113113
}
114114

115+
@Override
116+
public void setAttribute(String key, String value) {
117+
this.impl.setAttribute(key, value);
118+
}
119+
120+
@Override
121+
public void setAttributes(ReadableMap attributes) {
122+
this.impl.setAttributes(attributes);
123+
}
124+
115125
@Override
116126
public void closeNativeSdk(Promise promise) {
117127
this.impl.closeNativeSdk(promise);

packages/core/android/src/oldarch/java/io/sentry/react/RNSentryModule.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,16 @@ public void setTag(String key, String value) {
112112
this.impl.setTag(key, value);
113113
}
114114

115+
@ReactMethod
116+
public void setAttribute(String key, String value) {
117+
this.impl.setAttribute(key, value);
118+
}
119+
120+
@ReactMethod
121+
public void setAttributes(ReadableMap attributes) {
122+
this.impl.setAttributes(attributes);
123+
}
124+
115125
@ReactMethod
116126
public void closeNativeSdk(Promise promise) {
117127
this.impl.closeNativeSdk(promise);
@@ -132,6 +142,11 @@ public void fetchNativeDeviceContexts(Promise promise) {
132142
this.impl.fetchNativeDeviceContexts(promise);
133143
}
134144

145+
@ReactMethod
146+
public void fetchNativeLogAttributes(Promise promise) {
147+
this.impl.fetchNativeLogAttributes(promise);
148+
}
149+
135150
@ReactMethod
136151
public void fetchNativeSdkInfo(Promise promise) {
137152
this.impl.fetchNativeSdkInfo(promise);

packages/core/ios/RNSentry.mm

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -691,6 +691,22 @@ + (SentryUser *_Nullable)userFrom:(NSDictionary *)userKeys
691691
configureScope:^(SentryScope *_Nonnull scope) { [scope setTagValue:value forKey:key]; }];
692692
}
693693

694+
RCT_EXPORT_METHOD(setAttribute : (NSString *)key value : (NSString *)value)
695+
{
696+
// TODO(alwx): This is not implemented in sentry-cocoa yet
697+
/*[SentrySDKWrapper
698+
configureScope:^(SentryScope *_Nonnull scope) { [scope setAttribute:value forKey:key]; }];*/
699+
}
700+
701+
RCT_EXPORT_METHOD(setAttributes : (NSDictionary *)attributes)
702+
{
703+
// TODO(alwx): This is not implemented in sentry-cocoa yet
704+
/*[SentrySDKWrapper configureScope:^(SentryScope *_Nonnull scope) {
705+
[attributes enumerateKeysAndObjectsUsingBlock:^(
706+
NSString *key, NSString *value, BOOL *stop) { [scope setAttribute:value forKey:key]; }];
707+
}];*/
708+
}
709+
694710
RCT_EXPORT_METHOD(crash) { [SentrySDKWrapper crash]; }
695711

696712
RCT_EXPORT_METHOD(

0 commit comments

Comments
 (0)