Skip to content

Commit 17d98d8

Browse files
authored
Merge pull request #11849 from getsentry/prepare-release/8.0.0-beta.5
meta(changelog): Update changelog for v8.0.0-beta.5
2 parents 9d58901 + c59a64a commit 17d98d8

File tree

236 files changed

+4952
-783
lines changed

Some content is hidden

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

236 files changed

+4952
-783
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -998,6 +998,7 @@ jobs:
998998
'create-next-app',
999999
'create-remix-app',
10001000
'create-remix-app-v2',
1001+
'create-remix-app-express',
10011002
'create-remix-app-express-vite-dev',
10021003
'debug-id-sourcemaps',
10031004
# 'esm-loader-node-express-app', # This is currently broken for upstream reasons. See https://github.com/getsentry/sentry-javascript/pull/11338#issuecomment-2025450675
@@ -1006,8 +1007,10 @@ jobs:
10061007
'react-create-hash-router',
10071008
'react-router-6-use-routes',
10081009
'standard-frontend-react',
1010+
'svelte-5',
10091011
'sveltekit',
10101012
'sveltekit-2',
1013+
'sveltekit-2-svelte-5',
10111014
'generic-ts3.8',
10121015
'node-fastify-app',
10131016
# TODO(v8): Re-enable hapi tests

CHANGELOG.md

Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,50 @@
44

55
- "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott
66

7+
## 8.0.0-beta.5
8+
9+
This beta release contains various bugfixes and improvements for the v8 beta cycle.
10+
11+
### Important Changes
12+
13+
- **feat(svelte): Add Svelte 5 support (#11807)**
14+
15+
We now officially support Svelte 5.
16+
17+
- **feat(browser): Send standalone fetch and XHR spans if there's no active parent span (#11783)**
18+
19+
Starting with this version, spans for outgoing fetch/xhr requests will be captured even if no pageload/navigation span
20+
is ongoing. This means that you will be able to have a more complete trace, especially for web applications that make a
21+
lot of HTTP requests on longer lived pages.
22+
23+
### Other Changes
24+
25+
- feat(astro): Add `transactionName` to isolation scope for requests (#11786)
26+
- feat(browser): Create standalone INP spans via `startInactiveSpan` (#11788)
27+
- feat(core): Add `trace` envelope header to span envelope (#11699)
28+
- feat(core): Add options to start standalone (segment) spans via `start*Span` APIs (#11696)
29+
- feat(core): Set default scope for BaseClient methods (#11775)
30+
- feat(core): Wrap cron `withMonitor` callback in `withIsolationScope` (#11797)
31+
- feat(feedback): New feedback button design (#11641)
32+
- feat(nextjs): Add `transactionName` to isolation scope for Next.js server side features (#11782)
33+
- feat(nextjs): Mute webpack warnings about critical dependencies inside `@opentelemetry/instrumentation` (#11810)
34+
- feat(node): Upgrade @prisma/instrumentation to 5.13.0 (#11779)
35+
- feat(react): type error as unknown in ErrorBoundary (#11819)
36+
- feat(remix): Add `wrapHandleErrorWithSentry` (#10370)
37+
- feat(remix): Set `formData` as `action` span data. (#10836)
38+
- feat(remix): Update scope `transactionName` for Remix server features (#11784)
39+
- fix(angular): Call `showReportDialog` in root context (#11703)
40+
- fix(core): Capture only failed console.assert calls (#11799)
41+
- fix(ember): Ensure unnecessary spans are avoided (#11846)
42+
- fix(feedback): Clarify the difference between createWidget and create Form in the feedback public api (#11838)
43+
- fix(feedback): Fix feedback type (#11787)
44+
- fix(feedback): Vendor preact into bundle (#11845)
45+
- fix(remix): Rethrow `loader`, `action` and `documentRequest` errors (#11793)
46+
- ref: Always return an immediately generated event ID from `captureException()`, `captureMessage()`, and
47+
`captureEvent()` (#11805)
48+
- ref(core): Remove transaction name extraction from `requestDataIntegration` (#11513)
49+
- ref(svelte): Use `onlyIfParent` for recording component update spans (#11809)
50+
751
## 8.0.0-beta.4
852

953
### Important Changes
@@ -851,6 +895,116 @@ We have also removed or updated a variety of deprecated APIs.
851895
- ref: Remove usage of span tags (#10808)
852896
- ref: Remove user segment (#10575)
853897

898+
## 7.112.2
899+
900+
- fix(nextjs|sveltekit): Ensure we can pass `browserTracingIntegration` (#11765)
901+
902+
## 7.112.1
903+
904+
- fix(ember/v7): Do not create rendering spans without transaction (#11750)
905+
906+
## 7.112.0
907+
908+
### Important Changes
909+
910+
- **feat: Export pluggable integrations from SDK packages (#11723)**
911+
912+
Instead of installing `@sentry/integrations`, you can now import the pluggable integrations directly from your SDK
913+
package:
914+
915+
```js
916+
// Before
917+
import * as Sentry fromv '@sentry/browser';
918+
import { dedupeIntegration } from '@sentry/integrations';
919+
920+
Sentry.init({
921+
integrations: [dedupeIntegration()],
922+
});
923+
924+
// After
925+
import * as Sentry from '@sentry/browser';
926+
927+
Sentry.init({
928+
integrations: [Sentry.dedupeIntegration()],
929+
});
930+
```
931+
932+
Note that only the functional integrations (e.g. `xxxIntegration()`) are re-exported.
933+
934+
### Other Changes
935+
936+
- feat(replay): Add "maxCanvasSize" option for replay canvases (#11732)
937+
- fix(serverless): [v7] Check if cloud event callback is a function (#11734)
938+
939+
## 7.111.0
940+
941+
- feat(core): Add `server.address` to browser `http.client` spans (#11663)
942+
- fix: Ensure next & sveltekit correctly handle `browserTracingIntegration` (#11647)
943+
- fix(browser): Don't assume window.document is available (#11598)
944+
945+
## 7.110.1
946+
947+
- fix(nextjs): Fix `tunnelRoute` matching logic for hybrid cloud (#11577)
948+
949+
## 7.110.0
950+
951+
### Important Changes
952+
953+
- **feat(tracing): Add interactions sample rate to browser tracing integrations (#11382)**
954+
955+
You can now use a `interactionsSampleRate` to control the sample rate of INP spans. `interactionsSampleRate` is applied
956+
on top of the global `tracesSampleRate`. Therefore if `interactionsSampleRate` is `0.5` and `tracesSampleRate` is `0.1`,
957+
then the actual sample rate for interactions is `0.05`.
958+
959+
```js
960+
Sentry.init({
961+
tracesSampleRate: 0.1,
962+
integrations: [
963+
Sentry.browserTracingIntegration({
964+
interactionsSampleRate: 0.5,
965+
}),
966+
],
967+
});
968+
```
969+
970+
- **Deprecations**
971+
972+
This release deprecates the `Hub` class, as well as the `addRequestDataToTransaction` method. The `trpcMiddleware`
973+
method is no longer on the `Handlers` export, but instead is a standalone export.
974+
975+
Please see the detailed [Migration docs](./MIGRATION.md#deprecations-in-7x) on how to migrate to the new APIs.
976+
977+
- feat: Deprecate and relocate `trpcMiddleware` (#11389)
978+
- feat(core): Deprecate `Hub` class (#11528)
979+
- feat(types): Deprecate `Hub` interface (#11530)
980+
- ref: Deprecate `addRequestDataToTransaction` (#11368)
981+
982+
### Other Changes
983+
984+
- feat(core): Update metric normalization (#11519)
985+
- feat(feedback): Customize feedback placeholder text color (#11521)
986+
- feat(remix): Skip span creation for `OPTIONS` and `HEAD` request. (#11485)
987+
- feat(utils): Add metric buckets rate limit (#11506)
988+
- fix(core): unref timer to not block node exit (#11483)
989+
- fix(metrics): Map `statsd` to `metric_bucket` (#11505)
990+
- fix(spans): Allow zero exclusive time for INP spans (#11408)
991+
- ref(feedback): Configure feedback fonts (#11520)
992+
993+
## 7.109.0
994+
995+
This release deprecates some exports from the `@sentry/replay` package. These exports have been moved to the browser SDK
996+
(or related framework SDKs like `@sentry/react`).
997+
998+
- feat(feedback): Make "required" text for input elements configurable (#11287)
999+
- feat(node): Add scope to ANR events (#11267)
1000+
- feat(replay): Bump `rrweb` to 2.12.0 (#11317)
1001+
- fix(node): Local variables skipped after Promise (#11248)
1002+
- fix(node): Skip capturing Hapi Boom error responses (#11324)
1003+
- fix(web-vitals): Check for undefined navigation entry (#11312)
1004+
- ref(replay): Deprecate `@sentry/replay` exports (#11242)
1005+
1006+
Work in this release contributed by @soerface. Thank you for your contribution!
1007+
8541008
## 7.108.0
8551009

8561010
This release fixes issues with Time to First Byte (TTFB) calculation in the SDK that was introduced with `7.95.0`. It

MIGRATION.md

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,7 @@ To make sure these integrations work properly you'll have to change how you
369369
- [AWS Serverless SDK](./MIGRATION.md#aws-serverless-sdk)
370370
- [Ember SDK](./MIGRATION.md#ember-sdk)
371371
- [Svelte SDK](./MIGRATION.md#svelte-sdk)
372+
- [React SDK](./MIGRATION.md#react-sdk)
372373

373374
### General
374375

@@ -1000,6 +1001,26 @@ const config = {
10001001
export default withSentryConfig(config);
10011002
```
10021003

1004+
### React SDK
1005+
1006+
#### Updated error types to be `unknown` instead of `Error`.
1007+
1008+
In v8, we are changing the `ErrorBoundary` error types returned from `onError`, `onReset`, `onUnmount`, and
1009+
`beforeCapture`. to be `unknown` instead of `Error`. This more accurately matches behaviour of `componentDidCatch`, the
1010+
lifecycle method the Sentry `ErrorBoundary` component uses.
1011+
1012+
As per the [React docs on error boundaries](https://react.dev/reference/react/Component#componentdidcatch):
1013+
1014+
> error: The `error` that was thrown. In practice, it will usually be an instance of `Error` but this is not guaranteed
1015+
> because JavaScript allows to throw any value, including strings or even `null`.
1016+
1017+
This means you will have to use `instanceof Error` or similar to explicitly make sure that the error thrown was an
1018+
instance of `Error`.
1019+
1020+
The Sentry SDK maintainers also went ahead and made a PR to update the
1021+
[TypeScript definitions of `componentDidCatch`](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/69434) for the
1022+
React package - this will be released with React 20.
1023+
10031024
### Gatsby SDK
10041025

10051026
#### Removal of Gatsby Initialization via plugin options
@@ -1119,6 +1140,7 @@ Sentry.init({
11191140
- [Updated behaviour of `transactionContext` passed to `tracesSampler`](./MIGRATION.md#transactioncontext-no-longer-passed-to-tracessampler)
11201141
- [Updated behaviour of `getClient()`](./MIGRATION.md#getclient-always-returns-a-client)
11211142
- [Updated behaviour of the SDK in combination with `onUncaughtException` handlers in Node.js](./MIGRATION.md#behaviour-in-combination-with-onuncaughtexception-handlers-in-node.js)
1143+
- [Updated expected return value for `captureException()`, `captureMessage()` and `captureEvent` methods on Clients](./MIGRATION.md#updated-expected-return-value-for-captureexception-capturemessage-and-captureevent-methods-on-clients)
11221144
- [Removal of Client-Side health check transaction filters](./MIGRATION.md#removal-of-client-side-health-check-transaction-filters)
11231145
- [Change of Replay default options (`unblock` and `unmask`)](./MIGRATION.md#change-of-replay-default-options-unblock-and-unmask)
11241146
- [Angular Tracing Decorator renaming](./MIGRATION.md#angular-tracing-decorator-renaming)
@@ -1179,6 +1201,11 @@ for this option defaulted to `true`.
11791201
Going forward, the default value for `exitEvenIfOtherHandlersAreRegistered` will be `false`, meaning that the SDK will
11801202
not exit your process when you have registered other `onUncaughtException` handlers.
11811203

1204+
#### Updated expected return value for `captureException()`, `captureMessage()` and `captureEvent` methods on Clients
1205+
1206+
The `Client` interface now expects implementations to always return a string representing the generated event ID for the
1207+
`captureException()`, `captureMessage()`, `captureEvent()` methods. Previously `undefined` was a valid return value.
1208+
11821209
#### Removal of Client-Side health check transaction filters
11831210

11841211
The SDK no longer filters out health check transactions by default. Instead, they are sent to Sentry but still dropped
@@ -1228,8 +1255,6 @@ export class HeaderComponent {
12281255
}
12291256
```
12301257

1231-
---
1232-
12331258
# Deprecations in 7.x
12341259

12351260
You can use the **Experimental** [@sentry/migr8](https://www.npmjs.com/package/@sentry/migr8) to automatically update
@@ -1365,6 +1390,19 @@ Instead of an `transactionContext` being passed to the `tracesSampler` callback,
13651390
will be removed in v8. Note that the `attributes` are only the attributes at span creation time, and some attributes may
13661391
only be set later during the span lifecycle (and thus not be available during sampling).
13671392

1393+
## Deprecate `wrapRemixHandleError` in Remix SDK (since v7.100.0)
1394+
1395+
This release deprecates `wrapRemixHandleError` in favor of using `sentryHandleError` from `@sentry/remix`. It can be
1396+
used as below:
1397+
1398+
```typescript
1399+
// entry.server.ts
1400+
1401+
export const handleError = Sentry.wrapHandleErrorWithSentry(() => {
1402+
// Custom handleError implementation
1403+
});
1404+
```
1405+
13681406
## Deprecate using `getClient()` to check if the SDK was initialized
13691407

13701408
In v8, `getClient()` will stop returning `undefined` if `Sentry.init()` was not called. For cases where this may be used

dev-packages/browser-integration-tests/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ or `init.js` is not defined in a case folder.
1414

1515
`subject.js` contains the logic that sets up the environment to be tested. It also can be defined locally and as a group
1616
fallback. Unlike `template.hbs` and `init.js`, it's not required to be defined for a group, as there may be cases that
17-
does not require a subject, instead the logic is injected using `injectScriptAndGetEvents` from `utils/helpers.ts`.
17+
does not require a subject.
1818

1919
`test.ts` is required for each test case, which contains the assertions (and if required the script injection logic).
2020
For every case, any set of `init.js`, `template.hbs` and `subject.js` can be defined locally, and each one of them will
2121
have precedence over the default definitions of the test group.
2222

2323
To test page multi-page navigations, you can specify additional `page-*.html` (e.g. `page-0.html`, `page-1.html`) files.
2424
These will also be compiled and initialized with the same `init.js` and `subject.js` files that are applied to
25-
`template.hbs/html`. Note: `page-*.html` file lookup **doesn not** fall back to the parent directories, meaning that
26-
page files have to be directly in the `test.ts` directory.
25+
`template.hbs/html`. Note: `page-*.html` file lookup **does not** fall back to the parent directories, meaning that page
26+
files have to be directly in the `test.ts` directory.
2727

2828
```
2929
suites/

dev-packages/browser-integration-tests/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
},
4141
"dependencies": {
4242
"@babel/preset-typescript": "^7.16.7",
43-
"@playwright/test": "^1.40.1",
43+
"@playwright/test": "^1.43.1",
4444
"@sentry-internal/rrweb": "2.11.0",
4545
"@sentry/browser": "8.0.0-beta.4",
4646
"axios": "1.6.7",

dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/non-string-arg/subject.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/non-string-arg/test.ts

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,32 @@ import { expect } from '@playwright/test';
22
import type { Event } from '@sentry/types';
33

44
import { sentryTest } from '../../../../../utils/fixtures';
5-
import { getFirstSentryEnvelopeRequest } from '../../../../../utils/helpers';
5+
import { getFirstSentryEnvelopeRequest, runScriptInSandbox } from '../../../../../utils/helpers';
66

77
sentryTest(
88
'should catch onerror calls with non-string first argument gracefully',
9-
async ({ getLocalTestPath, page }) => {
9+
async ({ getLocalTestPath, page, browserName }) => {
10+
if (browserName === 'webkit') {
11+
// This test fails on Webkit as erros thrown from `runScriptInSandbox` are Script Errors and skipped by Sentry
12+
sentryTest.skip();
13+
}
14+
1015
const url = await getLocalTestPath({ testDir: __dirname });
1116

12-
const eventData = await getFirstSentryEnvelopeRequest<Event>(page, url);
17+
await page.goto(url);
18+
19+
const errorEventPromise = getFirstSentryEnvelopeRequest<Event>(page);
20+
21+
await runScriptInSandbox(page, {
22+
content: `
23+
throw {
24+
type: 'Error',
25+
otherKey: 'otherValue',
26+
};
27+
`,
28+
});
29+
30+
const eventData = await errorEventPromise;
1331

1432
expect(eventData.exception?.values).toHaveLength(1);
1533
expect(eventData.exception?.values?.[0]).toMatchObject({

dev-packages/browser-integration-tests/suites/public-api/instrumentation/onError/rethrown/subject.js

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)