Skip to content

Commit 20d0171

Browse files
Merge 57b9041 into ffab994
2 parents ffab994 + 57b9041 commit 20d0171

File tree

205 files changed

+3273
-1010
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

205 files changed

+3273
-1010
lines changed

CHANGELOG.md

Lines changed: 247 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,195 @@
22

33
<!-- prettier-ignore-start -->
44
> [!IMPORTANT]
5-
> If you are upgrading to the `6.x` versions of the Sentry React Native SDK from `5.x` or below,
5+
> If you are upgrading to the `7.x` versions of the Sentry React Native SDK from `6.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
99
## Unreleased
1010

11+
### Features
12+
13+
- Automatically detect Release name and version for Expo Web ([#4967](https://github.com/getsentry/sentry-react-native/pull/4967))
14+
15+
### Changes
16+
17+
- Expose `featureFlagsIntegration` ([#4984](https://github.com/getsentry/sentry-react-native/pull/4984))
18+
19+
### Breaking changes
20+
21+
- Tags formatting logic updated ([#4965](https://github.com/getsentry/sentry-react-native/pull/4965))
22+
Here are the altered/unaltered types, make sure to update your UI filters and alerts.
23+
24+
Unaltered: string, null, number, and undefined values remain unchanged.
25+
26+
Altered: Boolean values are now capitalized: true -> True, false -> False.
27+
28+
### Fixes
29+
30+
- tags with symbol are now logged ([#4965](https://github.com/getsentry/sentry-react-native/pull/4965))
31+
- ignoreError now filters Native errors ([#4948](https://github.com/getsentry/sentry-react-native/pull/4948))
32+
33+
You can use strings to filter errors or RegEx for filtering with a pattern.
34+
35+
example:
36+
37+
```typescript
38+
ignoreErrors: [
39+
'1234', // Will filter any error message that contains 1234.
40+
'.*1234', // Will not filter as regex, instead will filter messages that contains '.*1234"
41+
/.*1234/, // Regex will filter any error message that ends with 1234
42+
/.*1234.*/ // Regex will filter any error message that contains 1234.
43+
]
44+
```
45+
1146
### Dependencies
1247

13-
- Bump JavaScript SDK from v8.54.0 to v8.55.0 ([#4981](https://github.com/getsentry/sentry-react-native/pull/4981))
14-
- [changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md#8550)
15-
- [diff](https://github.com/getsentry/sentry-javascript/compare/8.54.0...8.55.0)
48+
- Bump Android SDK from v8.14.0 to v8.17.0 ([#4953](https://github.com/getsentry/sentry-react-native/pull/4953), [#4955](https://github.com/getsentry/sentry-react-native/pull/4955), [#4987](https://github.com/getsentry/sentry-react-native/pull/4987))
49+
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#8170)
50+
- [diff](https://github.com/getsentry/sentry-java/compare/8.14.0...8.17.0)
51+
52+
## 7.0.0-beta.1
53+
54+
### Upgrading from 6.x to 7.0
55+
56+
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.
57+
58+
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.
59+
60+
### Major Changes
61+
62+
- Set `{{auto}}` if `user.ip_address` is `undefined` and `sendDefaultPii: true` ([#4466](https://github.com/getsentry/sentry-react-native/pull/4466))
63+
- `Sentry.captureUserFeedback` removed, use `Sentry.captureFeedback` instead ([#4855](https://github.com/getsentry/sentry-react-native/pull/4855))
64+
65+
### Major Changes from Sentry JS SDK v9
66+
67+
- Exceptions from `captureConsoleIntegration` are now marked as handled: true by default
68+
- `shutdownTimeout` moved from `core` to `@sentry/react-native`
69+
- `hasTracingEnabled` was renamed to `hasSpansEnabled`
70+
- You can no longer drop spans or return null on `beforeSendSpan` hook
71+
- Fork `scope` if custom scope is passed to `startSpanManual` or `startSpan`
72+
73+
#### Removed types
74+
75+
- TransactionNamingScheme
76+
- Request
77+
- Scope (prefer using the Scope class)
78+
79+
#### Other removed items.
80+
81+
- `autoSessionTracking` from options.
82+
To enable session tracking, ensure that `enableAutoSessionTracking` is enabled.
83+
- `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.
84+
- `getCurrentHub()`, `Hub`, and `getCurrentHubShim()`
85+
- `spanId` from propagation `context`
86+
- metrics API
87+
- `transactionContext` from `samplingContext`
88+
- `@sentry/utils` package, the exports were moved to `@sentry/core`
89+
- Standalone `Client` interface & deprecate `BaseClient`
90+
91+
### Features
92+
93+
- Add experimental support for Log tracing ([#4827](https://github.com/getsentry/sentry-react-native/pull/4827))
94+
95+
To enable it add the following code to your Sentry Options:
96+
97+
```typescript
98+
Sentry.init({
99+
// other options...
100+
_experiments: {
101+
enableLogs: true,
102+
},
103+
});
104+
```
105+
106+
You can also filter the logs being collected by adding beforeSendLogs into `_experiments`
107+
108+
```typescript
109+
Sentry.init({
110+
// other options...
111+
_experiments: {
112+
enableLogs: true,
113+
beforeSendLog: (log) => {
114+
return log;
115+
},
116+
}
117+
});
118+
```
119+
120+
### Changes
121+
122+
- Expose `logger` and `consoleLoggingIntegration` ([#4930](https://github.com/getsentry/sentry-react-native/pull/4930))
123+
- Remove deprecated `appOwnership` constant use in Expo Go detection ([#4893](https://github.com/getsentry/sentry-react-native/pull/4893))
124+
- Disable AppStart and NativeFrames in unsupported environments (web, Expo Go) ([#4897](https://github.com/getsentry/sentry-react-native/pull/4897))
125+
126+
### Self Hosted
127+
128+
- It is recommended to use Sentry Self Hosted version `25.2.0` or new for React Native V7 or newer
129+
130+
### Dependencies
131+
132+
- Bump Android SDK from v8.13.2 to v8.14.0 ([#4929](https://github.com/getsentry/sentry-react-native/pull/4929), [#4934](https://github.com/getsentry/sentry-react-native/pull/4934))
133+
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#8140)
134+
- [diff](https://github.com/getsentry/sentry-java/compare/8.13.2...8.14.0)
135+
136+
## 7.0.0-beta.0
137+
138+
### Upgrading from 6.x to 7.0
139+
140+
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.
141+
142+
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.
143+
144+
### Major Changes
145+
146+
- Set `{{auto}}` if `user.ip_address` is `undefined` and `sendDefaultPii: true` ([#4466](https://github.com/getsentry/sentry-react-native/pull/4466))
147+
- `Sentry.captureUserFeedback` removed, use `Sentry.captureFeedback` instead ([#4855](https://github.com/getsentry/sentry-react-native/pull/4855))
148+
149+
### Major Changes from Sentry JS SDK v9
150+
151+
- Exceptions from `captureConsoleIntegration` are now marked as handled: true by default
152+
- `shutdownTimeout` moved from `core` to `@sentry/react-native`
153+
- `hasTracingEnabled` was renamed to `hasSpansEnabled`
154+
- You can no longer drop spans or return null on `beforeSendSpan` hook
155+
- Fork `scope` if custom scope is passed to `startSpanManual` or `startSpan`
156+
157+
#### Removed types
158+
159+
- TransactionNamingScheme
160+
- Request
161+
- Scope (prefer using the Scope class)
162+
163+
#### Other removed items.
164+
165+
- `autoSessionTracking` from options.
166+
To enable session tracking, ensure that `enableAutoSessionTracking` is enabled.
167+
- `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.
168+
- `getCurrentHub()`, `Hub`, and `getCurrentHubShim()`
169+
- `spanId` from propagation `context`
170+
- metrics API
171+
- `transactionContext` from `samplingContext`
172+
- `@sentry/utils` package, the exports were moved to `@sentry/core`
173+
- Standalone `Client` interface & deprecate `BaseClient`
174+
175+
### Changes
176+
177+
- Use `Replay` interface for `browserReplayIntegration` return type ([#4858](https://github.com/getsentry/sentry-react-native/pull/4858))
178+
- Allow using `browserReplayIntegration` without `isWeb` guard ([#4858](https://github.com/getsentry/sentry-react-native/pull/4858))
179+
- The integration returns noop in non-browser environments
180+
- Use single `encodeUTF8` implementation through the SDK ([#4885](https://github.com/getsentry/sentry-react-native/pull/4885))
181+
- Use global `TextEncoder` (available with Hermes in React Native 0.74 or higher) to improve envelope encoding performance. ([#4874](https://github.com/getsentry/sentry-react-native/pull/4874))
182+
- `breadcrumbsIntegration` disables React Native incompatible options automatically ([#4886](https://github.com/getsentry/sentry-react-native/pull/4886))
183+
- On React Native Web, `browserSessionIntegration` is added when `enableAutoSessionTracking` is set to `True` ([#4732](https://github.com/getsentry/sentry-react-native/pull/4732))
184+
- Change `Cold/Warm App Start` span description to `Cold/Warm Start` ([#4636](https://github.com/getsentry/sentry-react-native/pull/4636))
185+
186+
### Dependencies
187+
188+
- Bump JavaScript SDK from v8.54.0 to v9.22.0 ([#4568](https://github.com/getsentry/sentry-react-native/pull/4568), [#4752](https://github.com/getsentry/sentry-react-native/pull/4752), [#4860](https://github.com/getsentry/sentry-react-native/pull/4860))
189+
- [changelog](https://github.com/getsentry/sentry-javascript/blob/9.22.0/CHANGELOG.md)
190+
- [diff](https://github.com/getsentry/sentry-javascript/compare/8.54.0...9.22.0)
191+
- Bump Android SDK from v7.20.1 to v8.13.2 ([#4490](https://github.com/getsentry/sentry-react-native/pull/4490), [#4847](https://github.com/getsentry/sentry-react-native/pull/4847))
192+
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#8132)
193+
- [diff](https://github.com/getsentry/sentry-java/compare/7.20.1...8.13.2)
16194

17195
## 6.17.0
18196

@@ -139,6 +317,71 @@
139317
- [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#2460)
140318
- [diff](https://github.com/getsentry/sentry-cli/compare/2.45.0...2.46.0)
141319

320+
## 7.0.0-alpha.0
321+
322+
### Upgrading from 6.x to 7.0
323+
324+
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.
325+
326+
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.
327+
328+
### Fixes
329+
330+
- 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))
331+
- Expo Updates Context values should all be lowercase ([#4809](https://github.com/getsentry/sentry-react-native/pull/4809))
332+
- Avoid duplicate network requests (fetch, xhr) by default ([#4816](https://github.com/getsentry/sentry-react-native/pull/4816))
333+
- `traceFetch` is disabled by default on mobile as RN uses a polyfill which will be traced by `traceXHR`
334+
335+
### Major Changes
336+
337+
- Set `{{auto}}` if `user.ip_address` is `undefined` and `sendDefaultPii: true` ([#4466](https://github.com/getsentry/sentry-react-native/pull/4466))
338+
- Exceptions from `captureConsoleIntegration` are now marked as handled: true by default
339+
- `shutdownTimeout` moved from `core` to `@sentry/react-native`
340+
- `hasTracingEnabled` was renamed to `hasSpansEnabled`
341+
- You can no longer drop spans or return null on `beforeSendSpan` hook
342+
343+
### Removed types
344+
345+
- TransactionNamingScheme
346+
- Request
347+
- Scope (prefer using the Scope class)
348+
349+
### Other removed items.
350+
351+
- `autoSessionTracking` from options.
352+
To enable session tracking, ensure that `enableAutoSessionTracking` is enabled.
353+
- `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.
354+
- `getCurrentHub()`, `Hub`, and `getCurrentHubShim()`
355+
- `spanId` from propagation `context`
356+
- metrics API
357+
- `transactionContext` from `samplingContext`
358+
- `@sentry/utils` package, the exports were moved to `@sentry/core`
359+
- Standalone `Client` interface & deprecate `BaseClient`
360+
361+
### Other Changes
362+
363+
- Fork `scope` if custom scope is passed to `startSpanManual` or `startSpan`
364+
- On React Native Web, `browserSessionIntegration` is added when `enableAutoSessionTracking` is set to `True` ([#4732](https://github.com/getsentry/sentry-react-native/pull/4732))
365+
- Change `Cold/Warm App Start` span description to `Cold/Warm Start` ([#4636](https://github.com/getsentry/sentry-react-native/pull/4636))
366+
367+
### Dependencies
368+
369+
- 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))
370+
- [changelog](https://github.com/getsentry/sentry-javascript/blob/9.12.0/CHANGELOG.md)
371+
- [diff](https://github.com/getsentry/sentry-javascript/compare/8.54.0...9.12.0)
372+
- Bump Android SDK from v7.20.1 to v8.11.1 ([#4490](https://github.com/getsentry/sentry-react-native/pull/4490))
373+
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#8111)
374+
- [diff](https://github.com/getsentry/sentry-java/compare/7.20.1...8.11.1)
375+
- 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))
376+
- [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#2450)
377+
- [diff](https://github.com/getsentry/sentry-cli/compare/2.43.1...2.45.0)
378+
- Bump Bundler Plugins from v3.3.1 to v3.4.0 ([#4805](https://github.com/getsentry/sentry-react-native/pull/4805))
379+
- [changelog](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/main/CHANGELOG.md#340)
380+
- [diff](https://github.com/getsentry/sentry-javascript-bundler-plugins/compare/3.3.1...3.4.0)
381+
- Bump Cocoa SDK from v8.49.2 to v8.50.0 ([#4807](https://github.com/getsentry/sentry-react-native/pull/4807))
382+
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8500)
383+
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.49.2...8.50.0)
384+
142385
## 6.14.0
143386

144387
### Fixes

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": "6.17.0",
3+
"version": "7.0.0-beta.1",
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": "8.55.0",
17-
"@sentry/react-native": "6.17.0",
16+
"@sentry/core": "9.22.0",
17+
"@sentry/react-native": "7.0.0-beta.1",
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": "6.17.0",
4+
"version": "7.0.0-beta.1",
55
"scripts": {
66
"type-check": "./run-type-check.sh"
77
}

dev-packages/type-check/ts3.8-test/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ declare global {
33
interface IDBObjectStore {}
44
interface Window {
55
fetch: any;
6+
setTimeout: any;
7+
document: any;
68
}
79
interface ShadowRoot {}
810
interface BufferSource {}
@@ -19,6 +21,8 @@ declare global {
1921
redirectCount: number;
2022
}
2123
interface PerformanceEntry {}
24+
interface Performance {}
25+
interface PerformanceNavigationTiming {}
2226
}
2327

2428
declare module 'react-native' {

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": "6.17.0",
3+
"version": "7.0.0-beta.1",
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": "6.17.0",
3+
"version": "7.0.0-beta.1",
44
"packages": [
55
"packages/*",
66
"dev-packages/*",

packages/core/.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ module.exports = {
4040
'@typescript-eslint/no-empty-function': 'off',
4141
'@typescript-eslint/no-explicit-any': 'off',
4242
'@typescript-eslint/unbound-method': 'off',
43+
'import/first': 'off',
4344
},
4445
},
4546
{

0 commit comments

Comments
 (0)