Skip to content

meta(changelog): Update changelog for v8.0.0-beta.5 #11849

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

Merged
merged 31 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
b5ebdb5
Merge pull request #11772 from getsentry/master
github-actions[bot] Apr 24, 2024
d5a86e6
feat(node): Upgrade @prisma/instrumentation to 5.13.0 (#11779)
AbhiPrasad Apr 24, 2024
d8831c5
feat(feedback): New feedback button design (#11641)
c298lee Apr 24, 2024
aecbfaf
fix(angular): Call `showReportDialog` in root context (#11703)
arturovt Apr 25, 2024
2288caf
ref(core): Remove transaction name extraction from `requestDataIntegr…
Lms24 Apr 25, 2024
427602e
feat(remix): Update scope `transactionName` for Remix server features…
Apr 25, 2024
1b3fb8b
feat(nextjs): Add `transactionName` to isolation scope for Next.js se…
Apr 25, 2024
84e9c97
feat(core): Add options to start standalone (segment) spans via `star…
Lms24 Apr 25, 2024
13be067
feat(core): Add `trace` envelope header to span envelope (#11699)
Lms24 Apr 25, 2024
45a05c5
feat(core): Set default scope for BaseClient methods (#11775)
timfish Apr 25, 2024
4b6cb4a
feat(browser): Send standalone fetch and XHR spans if there's no acti…
Lms24 Apr 25, 2024
a0415aa
ref(browser): Create standalone INP spans via `startInactiveSpan` (#1…
Lms24 Apr 25, 2024
40da10b
feat(astro): Add `transactionName` to isolation scope for requests (#…
Apr 26, 2024
18ba344
fix(core): Capture only failed console.assert calls (#11799)
andrew0 Apr 26, 2024
79818ff
fix(feedback): Fix feedback type (#11787)
mydea Apr 26, 2024
48995b1
ref: Always return an immediately generated event ID from `captureExc…
Apr 26, 2024
eb35e54
ref(svelte): Use `onlyIfParent` for recording component update spans …
Lms24 Apr 26, 2024
9a6c6a7
feat(core): Wrap cron `withMonitor` callback in `withIsolationScope` …
timfish Apr 26, 2024
eec70b5
fix(remix): Rethrow `loader`, `action` and `documentRequest` errors (…
onurtemizkan Apr 26, 2024
7eef5df
feat(nextjs): Mute webpack warnings about critical dependencies insid…
Apr 26, 2024
58a36e4
feat(svelte): Add Svelte 5 support (#11807)
Lms24 Apr 26, 2024
2b20e06
chore: Update changelog to include latest v7 release (#11816)
AbhiPrasad Apr 26, 2024
101c31b
feat(remix): Add `wrapHandleErrorWithSentry` (#10370)
onurtemizkan Apr 26, 2024
43e370f
test(svelte): Add Svelte 5 E2E test app (#11814)
Lms24 Apr 26, 2024
cda367c
ref(test): Trigger top-level errors inside sandbox. (#11712)
onurtemizkan Apr 26, 2024
d381ace
feat(remix): Set `formData` as `action` span data. (#10836)
onurtemizkan Apr 26, 2024
7759d18
feat(react): type error as unknown in ErrorBoundary (#11819)
AbhiPrasad Apr 29, 2024
8343308
fix(feedback): Vendor preact into bundle (#11845)
mydea Apr 30, 2024
40f30d5
fix(feedback): Clarify the difference between createWidget and create…
ryan953 Apr 30, 2024
b46a735
fix(ember): Ensure unnecessary spans are avoided (#11846)
mydea Apr 30, 2024
c59a64a
meta(changelog): Update changelog for v8.0.0-beta.5
mydea Apr 30, 2024
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
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -998,6 +998,7 @@ jobs:
'create-next-app',
'create-remix-app',
'create-remix-app-v2',
'create-remix-app-express',
'create-remix-app-express-vite-dev',
'debug-id-sourcemaps',
# 'esm-loader-node-express-app', # This is currently broken for upstream reasons. See https://github.com/getsentry/sentry-javascript/pull/11338#issuecomment-2025450675
Expand All @@ -1006,8 +1007,10 @@ jobs:
'react-create-hash-router',
'react-router-6-use-routes',
'standard-frontend-react',
'svelte-5',
'sveltekit',
'sveltekit-2',
'sveltekit-2-svelte-5',
'generic-ts3.8',
'node-fastify-app',
# TODO(v8): Re-enable hapi tests
Expand Down
154 changes: 154 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,50 @@

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

## 8.0.0-beta.5

This beta release contains various bugfixes and improvements for the v8 beta cycle.

### Important Changes

- **feat(svelte): Add Svelte 5 support (#11807)**

We now officially support Svelte 5.

- **feat(browser): Send standalone fetch and XHR spans if there's no active parent span (#11783)**

Starting with this version, spans for outgoing fetch/xhr requests will be captured even if no pageload/navigation span
is ongoing. This means that you will be able to have a more complete trace, especially for web applications that make a
lot of HTTP requests on longer lived pages.

### Other Changes

- feat(astro): Add `transactionName` to isolation scope for requests (#11786)
- feat(browser): Create standalone INP spans via `startInactiveSpan` (#11788)
- feat(core): Add `trace` envelope header to span envelope (#11699)
- feat(core): Add options to start standalone (segment) spans via `start*Span` APIs (#11696)
- feat(core): Set default scope for BaseClient methods (#11775)
- feat(core): Wrap cron `withMonitor` callback in `withIsolationScope` (#11797)
- feat(feedback): New feedback button design (#11641)
- feat(nextjs): Add `transactionName` to isolation scope for Next.js server side features (#11782)
- feat(nextjs): Mute webpack warnings about critical dependencies inside `@opentelemetry/instrumentation` (#11810)
- feat(node): Upgrade @prisma/instrumentation to 5.13.0 (#11779)
- feat(react): type error as unknown in ErrorBoundary (#11819)
- feat(remix): Add `wrapHandleErrorWithSentry` (#10370)
- feat(remix): Set `formData` as `action` span data. (#10836)
- feat(remix): Update scope `transactionName` for Remix server features (#11784)
- fix(angular): Call `showReportDialog` in root context (#11703)
- fix(core): Capture only failed console.assert calls (#11799)
- fix(ember): Ensure unnecessary spans are avoided (#11846)
- fix(feedback): Clarify the difference between createWidget and create Form in the feedback public api (#11838)
- fix(feedback): Fix feedback type (#11787)
- fix(feedback): Vendor preact into bundle (#11845)
- fix(remix): Rethrow `loader`, `action` and `documentRequest` errors (#11793)
- ref: Always return an immediately generated event ID from `captureException()`, `captureMessage()`, and
`captureEvent()` (#11805)
- ref(core): Remove transaction name extraction from `requestDataIntegration` (#11513)
- ref(svelte): Use `onlyIfParent` for recording component update spans (#11809)

## 8.0.0-beta.4

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

## 7.112.2

- fix(nextjs|sveltekit): Ensure we can pass `browserTracingIntegration` (#11765)

## 7.112.1

- fix(ember/v7): Do not create rendering spans without transaction (#11750)

## 7.112.0

### Important Changes

- **feat: Export pluggable integrations from SDK packages (#11723)**

Instead of installing `@sentry/integrations`, you can now import the pluggable integrations directly from your SDK
package:

```js
// Before
import * as Sentry fromv '@sentry/browser';
import { dedupeIntegration } from '@sentry/integrations';

Sentry.init({
integrations: [dedupeIntegration()],
});

// After
import * as Sentry from '@sentry/browser';

Sentry.init({
integrations: [Sentry.dedupeIntegration()],
});
```

Note that only the functional integrations (e.g. `xxxIntegration()`) are re-exported.

### Other Changes

- feat(replay): Add "maxCanvasSize" option for replay canvases (#11732)
- fix(serverless): [v7] Check if cloud event callback is a function (#11734)

## 7.111.0

- feat(core): Add `server.address` to browser `http.client` spans (#11663)
- fix: Ensure next & sveltekit correctly handle `browserTracingIntegration` (#11647)
- fix(browser): Don't assume window.document is available (#11598)

## 7.110.1

- fix(nextjs): Fix `tunnelRoute` matching logic for hybrid cloud (#11577)

## 7.110.0

### Important Changes

- **feat(tracing): Add interactions sample rate to browser tracing integrations (#11382)**

You can now use a `interactionsSampleRate` to control the sample rate of INP spans. `interactionsSampleRate` is applied
on top of the global `tracesSampleRate`. Therefore if `interactionsSampleRate` is `0.5` and `tracesSampleRate` is `0.1`,
then the actual sample rate for interactions is `0.05`.

```js
Sentry.init({
tracesSampleRate: 0.1,
integrations: [
Sentry.browserTracingIntegration({
interactionsSampleRate: 0.5,
}),
],
});
```

- **Deprecations**

This release deprecates the `Hub` class, as well as the `addRequestDataToTransaction` method. The `trpcMiddleware`
method is no longer on the `Handlers` export, but instead is a standalone export.

Please see the detailed [Migration docs](./MIGRATION.md#deprecations-in-7x) on how to migrate to the new APIs.

- feat: Deprecate and relocate `trpcMiddleware` (#11389)
- feat(core): Deprecate `Hub` class (#11528)
- feat(types): Deprecate `Hub` interface (#11530)
- ref: Deprecate `addRequestDataToTransaction` (#11368)

### Other Changes

- feat(core): Update metric normalization (#11519)
- feat(feedback): Customize feedback placeholder text color (#11521)
- feat(remix): Skip span creation for `OPTIONS` and `HEAD` request. (#11485)
- feat(utils): Add metric buckets rate limit (#11506)
- fix(core): unref timer to not block node exit (#11483)
- fix(metrics): Map `statsd` to `metric_bucket` (#11505)
- fix(spans): Allow zero exclusive time for INP spans (#11408)
- ref(feedback): Configure feedback fonts (#11520)

## 7.109.0

This release deprecates some exports from the `@sentry/replay` package. These exports have been moved to the browser SDK
(or related framework SDKs like `@sentry/react`).

- feat(feedback): Make "required" text for input elements configurable (#11287)
- feat(node): Add scope to ANR events (#11267)
- feat(replay): Bump `rrweb` to 2.12.0 (#11317)
- fix(node): Local variables skipped after Promise (#11248)
- fix(node): Skip capturing Hapi Boom error responses (#11324)
- fix(web-vitals): Check for undefined navigation entry (#11312)
- ref(replay): Deprecate `@sentry/replay` exports (#11242)

Work in this release contributed by @soerface. Thank you for your contribution!

## 7.108.0

This release fixes issues with Time to First Byte (TTFB) calculation in the SDK that was introduced with `7.95.0`. It
Expand Down
42 changes: 40 additions & 2 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@ To make sure these integrations work properly you'll have to change how you
- [AWS Serverless SDK](./MIGRATION.md#aws-serverless-sdk)
- [Ember SDK](./MIGRATION.md#ember-sdk)
- [Svelte SDK](./MIGRATION.md#svelte-sdk)
- [React SDK](./MIGRATION.md#react-sdk)

### General

Expand Down Expand Up @@ -1000,6 +1001,26 @@ const config = {
export default withSentryConfig(config);
```

### React SDK

#### Updated error types to be `unknown` instead of `Error`.

In v8, we are changing the `ErrorBoundary` error types returned from `onError`, `onReset`, `onUnmount`, and
`beforeCapture`. to be `unknown` instead of `Error`. This more accurately matches behaviour of `componentDidCatch`, the
lifecycle method the Sentry `ErrorBoundary` component uses.

As per the [React docs on error boundaries](https://react.dev/reference/react/Component#componentdidcatch):

> error: The `error` that was thrown. In practice, it will usually be an instance of `Error` but this is not guaranteed
> because JavaScript allows to throw any value, including strings or even `null`.

This means you will have to use `instanceof Error` or similar to explicitly make sure that the error thrown was an
instance of `Error`.

The Sentry SDK maintainers also went ahead and made a PR to update the
[TypeScript definitions of `componentDidCatch`](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/69434) for the
React package - this will be released with React 20.

### Gatsby SDK

#### Removal of Gatsby Initialization via plugin options
Expand Down Expand Up @@ -1119,6 +1140,7 @@ Sentry.init({
- [Updated behaviour of `transactionContext` passed to `tracesSampler`](./MIGRATION.md#transactioncontext-no-longer-passed-to-tracessampler)
- [Updated behaviour of `getClient()`](./MIGRATION.md#getclient-always-returns-a-client)
- [Updated behaviour of the SDK in combination with `onUncaughtException` handlers in Node.js](./MIGRATION.md#behaviour-in-combination-with-onuncaughtexception-handlers-in-node.js)
- [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)
- [Removal of Client-Side health check transaction filters](./MIGRATION.md#removal-of-client-side-health-check-transaction-filters)
- [Change of Replay default options (`unblock` and `unmask`)](./MIGRATION.md#change-of-replay-default-options-unblock-and-unmask)
- [Angular Tracing Decorator renaming](./MIGRATION.md#angular-tracing-decorator-renaming)
Expand Down Expand Up @@ -1179,6 +1201,11 @@ for this option defaulted to `true`.
Going forward, the default value for `exitEvenIfOtherHandlersAreRegistered` will be `false`, meaning that the SDK will
not exit your process when you have registered other `onUncaughtException` handlers.

#### Updated expected return value for `captureException()`, `captureMessage()` and `captureEvent` methods on Clients

The `Client` interface now expects implementations to always return a string representing the generated event ID for the
`captureException()`, `captureMessage()`, `captureEvent()` methods. Previously `undefined` was a valid return value.

#### Removal of Client-Side health check transaction filters

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

---

# Deprecations in 7.x

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

## Deprecate `wrapRemixHandleError` in Remix SDK (since v7.100.0)

This release deprecates `wrapRemixHandleError` in favor of using `sentryHandleError` from `@sentry/remix`. It can be
used as below:

```typescript
// entry.server.ts

export const handleError = Sentry.wrapHandleErrorWithSentry(() => {
// Custom handleError implementation
});
```

## Deprecate using `getClient()` to check if the SDK was initialized

In v8, `getClient()` will stop returning `undefined` if `Sentry.init()` was not called. For cases where this may be used
Expand Down
6 changes: 3 additions & 3 deletions dev-packages/browser-integration-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ or `init.js` is not defined in a case folder.

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

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

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

```
suites/
Expand Down
2 changes: 1 addition & 1 deletion dev-packages/browser-integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
},
"dependencies": {
"@babel/preset-typescript": "^7.16.7",
"@playwright/test": "^1.40.1",
"@playwright/test": "^1.43.1",
"@sentry-internal/rrweb": "2.11.0",
"@sentry/browser": "8.0.0-beta.4",
"axios": "1.6.7",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,32 @@ import { expect } from '@playwright/test';
import type { Event } from '@sentry/types';

import { sentryTest } from '../../../../../utils/fixtures';
import { getFirstSentryEnvelopeRequest } from '../../../../../utils/helpers';
import { getFirstSentryEnvelopeRequest, runScriptInSandbox } from '../../../../../utils/helpers';

sentryTest(
'should catch onerror calls with non-string first argument gracefully',
async ({ getLocalTestPath, page }) => {
async ({ getLocalTestPath, page, browserName }) => {
if (browserName === 'webkit') {
// This test fails on Webkit as erros thrown from `runScriptInSandbox` are Script Errors and skipped by Sentry
sentryTest.skip();
}

const url = await getLocalTestPath({ testDir: __dirname });

const eventData = await getFirstSentryEnvelopeRequest<Event>(page, url);
await page.goto(url);

const errorEventPromise = getFirstSentryEnvelopeRequest<Event>(page);

await runScriptInSandbox(page, {
content: `
throw {
type: 'Error',
otherKey: 'otherValue',
};
`,
});

const eventData = await errorEventPromise;

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

This file was deleted.

Loading