Skip to content

Release v7.0.0 #4653

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 32 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
380b389
update migration numbers on changelog (#4594)
lucas-zimerman Feb 25, 2025
9ad6fb8
fix(appStart): Align span description with other platforms (#4636)
krystofwoldrich Mar 10, 2025
f5a43d3
chore(deps): Bump Android SDK to v8.3.0 (#4490)
antonis Mar 13, 2025
077a1bd
Merge branch 'main' into v7
antonis Apr 2, 2025
6eaf70f
feat: Bump to Sentry Javascript V9 (#4568)
lucas-zimerman Apr 15, 2025
90aa098
Feat: V7 - JavaScript V9 Add browser session integration (#4732)
lucas-zimerman Apr 15, 2025
a852e28
chore: remove allowSyntheticDefaultImports from TypeScript configurat…
krystofwoldrich Apr 15, 2025
99b2852
Ref: Use main carrier on useEncodePolyfill (#4731)
lucas-zimerman Apr 15, 2025
51f9b96
chore(deps): v7: Bump Android SDK to v8.6.0 (#4663)
antonis Apr 16, 2025
7a15b00
Merge remote-tracking branch 'origin/main' into v7
krystofwoldrich Apr 16, 2025
2c9bcd9
fix(changelog): Move JS and Android deps to the unreleased section (#…
krystofwoldrich Apr 16, 2025
4fabd63
chore: bump JavaScript SDK to v9.12.0 (#4752)
krystofwoldrich Apr 16, 2025
29876df
fix(sdk): Set `{{auto}}` if `user.ip_address` is `undefined` and `sen…
krystofwoldrich Apr 16, 2025
6f2f83f
chore(deps): v7: Bump Android SDK to v8.8.0 (#4755)
antonis Apr 22, 2025
61f61ca
chore(deps): v7: Bump Android SDK to v8.9.0 (#4775)
antonis Apr 24, 2025
261f6a9
Bump Android from 8.9.0 to 8.10.0 (#4781)
antonis Apr 28, 2025
391dc92
chore(typescript): Enable strictNullChecks for the SDK source (#4760)
krystofwoldrich Apr 29, 2025
c68710a
chore(deps): v7: Bump Android SDK to v8.11.0 (#4793)
antonis Apr 30, 2025
10c9244
chore(deps): v7: Bump Android SDK to v8.11.1 (#4796)
antonis May 2, 2025
a1bd56f
chore(wrap): Remove props `updateProps`, `name` and `children` from w…
lucas-zimerman May 8, 2025
61ef053
Merge remote-tracking branch 'origin/main' into v7
krystofwoldrich May 11, 2025
1528fb5
Fix changelog
krystofwoldrich May 11, 2025
5ccf41a
release: 7.0.0-alpha.0
getsentry-bot May 12, 2025
0b5266e
Merge branch 'release/7.0.0-alpha.0' into v7
May 12, 2025
3f74051
Fix v7 other changes section header (#4823)
antonis May 12, 2025
636c53e
sync changelog (#4824)
lucas-zimerman May 12, 2025
a363b09
chore(deps-v7): update Android SDK to v8.12.0 (#4847)
lucas-zimerman May 21, 2025
80caa11
chore(deps-v7): update Cocoa SDK to v8.51.1 (#4843)
lucas-zimerman May 26, 2025
c27dafb
Bump Android to 8.13.1 (#4861)
antonis May 27, 2025
c6d4d0a
chore(deps-v7): update Javascript SDK to v9.22.0 (#4860)
lucas-zimerman May 27, 2025
e171ea3
feat(replay): Allow using browserReplayIntegration without isWeb guar…
krystofwoldrich May 27, 2025
6a8b747
fix(lint): In `browserReplay.ts`
krystofwoldrich May 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 67 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,85 @@

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

## Unreleased

### Changes

- Use `Replay` interface for `browserReplayIntegration` return type ([#4858](https://github.com/getsentry/sentry-react-native/pull/4858))
- Allow using `browserReplayIntegration` without `isWeb` guard ([#4858](https://github.com/getsentry/sentry-react-native/pull/4858))
- The integration returns noop in non-browser environments

### Dependencies

- Bump JavaScript SDK from v9.12.0 to v9.22.0 ([#4860](https://github.com/getsentry/sentry-react-native/pull/4860))
- [changelog](https://github.com/getsentry/sentry-javascript/blob/9.22.0/CHANGELOG.md)
- [diff](https://github.com/getsentry/sentry-javascript/compare/9.12.0...9.22.0)
- Bump Cocoa SDK from v8.50.2 to v8.51.1 ([#4843](https://github.com/getsentry/sentry-react-native/pull/4843))
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8511)
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.50.0...8.51.1)
- Bump Android SDK from v8.11.1 to v8.13.1 ([#4847](https://github.com/getsentry/sentry-react-native/pull/4847))
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#8131)
- [diff](https://github.com/getsentry/sentry-java/compare/8.11.1...8.13.1)

## 7.0.0-alpha.0

### Upgrading from 6.x to 7.0

Version 7 of the Sentry React Native SDK primarily introduces API cleanup and version support changes based on the Sentry Javascript SDK version 9. This update contains behavioral changes that will not be caught by type checkers, linters, or tests, so we recommend carefully reading through the entire migration guide instead of relying on automatic tooling.

Version 7 of the SDK is compatible with Sentry self-hosted versions 24.4.2 or higher (unchanged from v6). Lower versions may continue to work, but may not support all features.

### Fixes

- Expo Updates Context is passed to native after native init to be available for crashes ([#4808](https://github.com/getsentry/sentry-react-native/pull/4808))
- Expo Updates Context values should all be lowercase ([#4809](https://github.com/getsentry/sentry-react-native/pull/4809))
- Avoid duplicate network requests (fetch, xhr) by default ([#4816](https://github.com/getsentry/sentry-react-native/pull/4816))
- `traceFetch` is disabled by default on mobile as RN uses a polyfill which will be traced by `traceXHR`

### Major Changes

- Set `{{auto}}` if `user.ip_address` is `undefined` and `sendDefaultPii: true` ([#4466](https://github.com/getsentry/sentry-react-native/pull/4466))
- Exceptions from `captureConsoleIntegration` are now marked as handled: true by default
- `shutdownTimeout` moved from `core` to `@sentry/react-native`
- `hasTracingEnabled` was renamed to `hasSpansEnabled`
- You can no longer drop spans or return null on `beforeSendSpan` hook

### Removed types

- TransactionNamingScheme
- Request
- Scope (prefer using the Scope class)

### Other removed items.

- `autoSessionTracking` from options.
To enable session tracking, ensure that `enableAutoSessionTracking` is enabled.
- `enableTracing`. Instead, set `tracesSampleRate` to a value greater than `zero` to `enable tracing`, `0` to keep tracing integrations active without sampling, or `undefined` to disable the performance integration.
- `getCurrentHub()`, `Hub`, and `getCurrentHubShim()`
- `spanId` from propagation `context`
- metrics API
- `transactionContext` from `samplingContext`
- `@sentry/utils` package, the exports were moved to `@sentry/core`
- Standalone `Client` interface & deprecate `BaseClient`

### Other Changes

- Fork `scope` if custom scope is passed to `startSpanManual` or `startSpan`
- On React Native Web, `browserSessionIntegration` is added when `enableAutoSessionTracking` is set to `True` ([#4732](https://github.com/getsentry/sentry-react-native/pull/4732))
- Change `Cold/Warm App Start` span description to `Cold/Warm Start` ([#4636](https://github.com/getsentry/sentry-react-native/pull/4636))

### Dependencies

- Bump JavaScript SDK from v8.54.0 to v9.12.0 ([#4568](https://github.com/getsentry/sentry-react-native/pull/4568), [#4752](https://github.com/getsentry/sentry-react-native/pull/4752))
- [changelog](https://github.com/getsentry/sentry-javascript/blob/9.12.0/CHANGELOG.md)
- [diff](https://github.com/getsentry/sentry-javascript/compare/8.54.0...9.12.0)
- Bump Android SDK from v7.20.1 to v8.11.1 ([#4490](https://github.com/getsentry/sentry-react-native/pull/4490))
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#8111)
- [diff](https://github.com/getsentry/sentry-java/compare/7.20.1...8.11.1)
- Bump CLI from v2.43.1 to v2.45.0 ([#4804](https://github.com/getsentry/sentry-react-native/pull/4804), [#4818](https://github.com/getsentry/sentry-react-native/pull/4818))
- [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#2450)
- [diff](https://github.com/getsentry/sentry-cli/compare/2.43.1...2.45.0)
Expand All @@ -25,11 +91,6 @@
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8500)
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.49.2...8.50.0)

### Fixes

- Avoid duplicate network requests (fetch, xhr) by default ([#4816](https://github.com/getsentry/sentry-react-native/pull/4816))
- `traceFetch` is disabled by default on mobile as RN uses a polyfill which will be traced by `traceXHR`

## 6.13.1

### Fixes
Expand Down
6 changes: 3 additions & 3 deletions dev-packages/e2e-tests/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sentry-react-native-e2e-tests",
"version": "6.13.1",
"version": "7.0.0-alpha.0",
"private": true,
"description": "Sentry React Native End to End Tests Library",
"main": "dist/index.js",
Expand All @@ -13,8 +13,8 @@
"devDependencies": {
"@babel/preset-env": "^7.25.3",
"@babel/preset-typescript": "^7.18.6",
"@sentry/core": "8.54.0",
"@sentry/react-native": "6.13.1",
"@sentry/core": "9.22.0",
"@sentry/react-native": "7.0.0-alpha.0",
"@types/node": "^20.9.3",
"@types/react": "^18.2.64",
"appium": "2.4.1",
Expand Down
2 changes: 1 addition & 1 deletion dev-packages/type-check/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "sentry-react-native-type-check",
"private": true,
"version": "6.13.1",
"version": "7.0.0-alpha.0",
"scripts": {
"type-check": "./run-type-check.sh"
}
Expand Down
4 changes: 4 additions & 0 deletions dev-packages/type-check/ts3.8-test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ declare global {
interface IDBObjectStore {}
interface Window {
fetch: any;
setTimeout: any;
document: any;
}
interface ShadowRoot {}
interface BufferSource {}
Expand All @@ -19,6 +21,8 @@ declare global {
redirectCount: number;
}
interface PerformanceEntry {}
interface Performance {}
interface PerformanceNavigationTiming {}
}

declare module 'react-native' {
Expand Down
2 changes: 1 addition & 1 deletion dev-packages/utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sentry-react-native-samples-utils",
"version": "6.13.1",
"version": "7.0.0-alpha.0",
"description": "Internal Samples Utils",
"main": "index.js",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"version": "6.13.1",
"version": "7.0.0-alpha.0",
"packages": [
"packages/*",
"dev-packages/*",
Expand Down
1 change: 1 addition & 0 deletions packages/core/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ module.exports = {
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/unbound-method': 'off',
'import/first': 'off',
},
},
{
Expand Down
2 changes: 1 addition & 1 deletion packages/core/RNSentry.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Pod::Spec.new do |s|

s.compiler_flags = other_cflags

s.dependency 'Sentry/HybridSDK', '8.50.0'
s.dependency 'Sentry/HybridSDK', '8.51.1'

if defined? install_modules_dependencies
# Default React Native dependencies for 0.71 and above (new and legacy architecture)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ final class RNSentryReplayOptions: XCTestCase {
XCTAssertEqual(actualOptions.sessionReplay.maskAllText, false)
XCTAssertEqual(actualOptions.sessionReplay.maskedViewClasses.count, 0)
}

func testEnableExperimentalViewRendererDefault() {
let optionsDict = ([
"dsn": "https://[email protected]/1234567",
Expand All @@ -177,9 +177,9 @@ final class RNSentryReplayOptions: XCTestCase {

let actualOptions = try! Options(dict: optionsDict as! [String: Any])

XCTAssertFalse(actualOptions.sessionReplay.enableExperimentalViewRenderer)
XCTAssertTrue(actualOptions.sessionReplay.enableExperimentalViewRenderer)
}

func testEnableExperimentalViewRendererTrue() {
let optionsDict = ([
"dsn": "https://[email protected]/1234567",
Expand All @@ -193,7 +193,7 @@ final class RNSentryReplayOptions: XCTestCase {

XCTAssertTrue(actualOptions.sessionReplay.enableExperimentalViewRenderer)
}

func testEnableExperimentalViewRendererFalse() {
let optionsDict = ([
"dsn": "https://[email protected]/1234567",
Expand All @@ -207,7 +207,7 @@ final class RNSentryReplayOptions: XCTestCase {

XCTAssertFalse(actualOptions.sessionReplay.enableExperimentalViewRenderer)
}

func testEnableFastViewRenderingDefault() {
let optionsDict = ([
"dsn": "https://[email protected]/1234567",
Expand All @@ -220,7 +220,7 @@ final class RNSentryReplayOptions: XCTestCase {

XCTAssertFalse(actualOptions.sessionReplay.enableFastViewRendering)
}

func testEnableFastViewRenderingTrue() {
let optionsDict = ([
"dsn": "https://[email protected]/1234567",
Expand All @@ -234,7 +234,7 @@ final class RNSentryReplayOptions: XCTestCase {

XCTAssertTrue(actualOptions.sessionReplay.enableFastViewRendering)
}

func testEnableFastViewRenderingFalse() {
let optionsDict = ([
"dsn": "https://[email protected]/1234567",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,5 @@ android {

dependencies {
implementation 'com.facebook.react:react-native:+'
api 'io.sentry:sentry-android:7.22.5'
api 'io.sentry:sentry-android:8.13.1'
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@
import com.facebook.react.bridge.WritableNativeMap;
import com.facebook.react.common.JavascriptException;
import io.sentry.Breadcrumb;
import io.sentry.HubAdapter;
import io.sentry.ILogger;
import io.sentry.IScope;
import io.sentry.ISentryExecutorService;
import io.sentry.ISerializer;
import io.sentry.Integration;
import io.sentry.ScopesAdapter;
import io.sentry.Sentry;
import io.sentry.SentryDate;
import io.sentry.SentryDateProvider;
Expand Down Expand Up @@ -87,6 +87,7 @@
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import java.util.concurrent.CountDownLatch;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
Expand Down Expand Up @@ -527,7 +528,7 @@ public void fetchNativeFrames(Promise promise) {
}

public void captureReplay(boolean isHardCrash, Promise promise) {
Sentry.getCurrentHub().getOptions().getReplayController().captureReplay(isHardCrash);
Sentry.getCurrentScopes().getOptions().getReplayController().captureReplay(isHardCrash);
promise.resolve(getCurrentReplayId());
}

Expand Down Expand Up @@ -623,7 +624,7 @@ public void fetchViewHierarchy(Promise promise) {
return;
}

ISerializer serializer = HubAdapter.getInstance().getOptions().getSerializer();
ISerializer serializer = ScopesAdapter.getInstance().getOptions().getSerializer();
final @Nullable byte[] bytes =
JsonSerializationUtils.bytesFrom(serializer, logger, viewHierarchy);
if (bytes == null) {
Expand Down Expand Up @@ -677,10 +678,6 @@ public void setUser(final ReadableMap userKeys, final ReadableMap userDataKeys)
if (userKeys.hasKey("ip_address")) {
userInstance.setIpAddress(userKeys.getString("ip_address"));
}

if (userKeys.hasKey("segment")) {
userInstance.setSegment(userKeys.getString("segment"));
}
}

if (userDataKeys != null) {
Expand Down Expand Up @@ -842,8 +839,7 @@ private void initializeAndroidProfiler() {
(int) SECONDS.toMicros(1) / profilingTracesHz,
new SentryFrameMetricsCollector(reactApplicationContext, logger, buildInfo),
executorService,
logger,
buildInfo);
logger);
}

public WritableMap startProfiling(boolean platformProfilers) {
Expand All @@ -867,7 +863,7 @@ public WritableMap startProfiling(boolean platformProfilers) {
}

public WritableMap stopProfiling() {
final boolean isDebug = HubAdapter.getInstance().getOptions().isDebug();
final boolean isDebug = ScopesAdapter.getInstance().getOptions().isDebug();
final WritableMap result = new WritableNativeMap();
File output = null;
try {
Expand Down Expand Up @@ -953,7 +949,7 @@ private String readStringFromFile(File path) throws IOException {
}

public void fetchNativeDeviceContexts(Promise promise) {
final @NotNull SentryOptions options = HubAdapter.getInstance().getOptions();
final @NotNull SentryOptions options = ScopesAdapter.getInstance().getOptions();
final @Nullable Context context = this.getReactApplicationContext().getApplicationContext();
final @Nullable IScope currentScope = InternalSentrySdk.getCurrentScope();
fetchNativeDeviceContexts(promise, options, context, currentScope);
Expand Down Expand Up @@ -990,7 +986,8 @@ protected void fetchNativeDeviceContexts(
}

public void fetchNativeSdkInfo(Promise promise) {
final @Nullable SdkVersion sdkVersion = HubAdapter.getInstance().getOptions().getSdkVersion();
final @Nullable SdkVersion sdkVersion =
ScopesAdapter.getInstance().getOptions().getSdkVersion();
if (sdkVersion == null) {
promise.resolve(null);
} else {
Expand Down Expand Up @@ -1069,14 +1066,14 @@ private void addPackages(SentryEvent event, SdkVersion sdk) {
if (eventSdk != null
&& "sentry.javascript.react-native".equals(eventSdk.getName())
&& sdk != null) {
List<SentryPackage> sentryPackages = sdk.getPackages();
Set<SentryPackage> sentryPackages = sdk.getPackageSet();
if (sentryPackages != null) {
for (SentryPackage sentryPackage : sentryPackages) {
eventSdk.addPackage(sentryPackage.getName(), sentryPackage.getVersion());
}
}

List<String> integrations = sdk.getIntegrations();
Set<String> integrations = sdk.getIntegrationSet();
if (integrations != null) {
for (String integration : integrations) {
eventSdk.addIntegration(integration);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

class RNSentryVersion {
static final String REACT_NATIVE_SDK_PACKAGE_NAME = "npm:@sentry/react-native";
static final String REACT_NATIVE_SDK_PACKAGE_VERSION = "6.13.1";
static final String REACT_NATIVE_SDK_PACKAGE_VERSION = "7.0.0-alpha.0";
static final String NATIVE_SDK_NAME = "sentry.native.android.react-native";
static final String ANDROID_SDK_NAME = "sentry.java.android.react-native";
static final String REACT_NATIVE_SDK_NAME = "sentry.javascript.react-native";
Expand Down
2 changes: 1 addition & 1 deletion packages/core/ios/RNSentryVersion.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
NSString *const NATIVE_SDK_NAME = @"sentry.cocoa.react-native";
NSString *const REACT_NATIVE_SDK_NAME = @"sentry.javascript.react-native";
NSString *const REACT_NATIVE_SDK_PACKAGE_NAME = @"npm:@sentry/react-native";
NSString *const REACT_NATIVE_SDK_PACKAGE_VERSION = @"6.13.1";
NSString *const REACT_NATIVE_SDK_PACKAGE_VERSION = @"7.0.0-alpha.0";
Loading