Skip to content

Commit 8c4e908

Browse files
authored
Merge branch 'develop' into abhi-profiling-node-experimental
2 parents 9aa11a2 + b846671 commit 8c4e908

File tree

219 files changed

+378
-660
lines changed

Some content is hidden

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

219 files changed

+378
-660
lines changed

.craft.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ targets:
2020
- name: npm
2121
id: '@sentry-internal/tracing'
2222
includeNames: /^sentry-internal-tracing-\d.*\.tgz$/
23-
## 1.5 Replay package (browser only)
23+
## 1.5 Replay Internal package (browser only)
2424
- name: npm
25-
id: '@sentry/replay'
26-
includeNames: /^sentry-replay-\d.*\.tgz$/
27-
## 1.6. OpenTelemetry package
25+
id: '@sentry-internal/replay'
26+
includeNames: /^sentry-internal-replay-\d.*\.tgz$/
27+
## 1.6 OpenTelemetry package
2828
- name: npm
2929
id: '@sentry/opentelemetry'
3030
includeNames: /^sentry-opentelemetry-\d.*\.tgz$/

CHANGELOG.md

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

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

7+
## 8.0.0-alpha.5
8+
9+
This is the fifth alpha release of Sentry JavaScript SDK v8, which includes a variety of breaking changes.
10+
11+
Read the [in-depth migration guide](./MIGRATION.md) to find out how to address any breaking changes in your code.
12+
13+
### Important Changes
14+
15+
- **feat(nextjs): Remove `client.(server|client).config.ts` functionality in favor of `instrumentation.ts` (#11059)**
16+
- feat(nextjs): Bump minimum required Next.js version to `13.2.0` (#11097)
17+
18+
With version 8 of the SDK we will no longer support the use of `sentry.server.config.ts` and `sentry.edge.config.ts`
19+
files. Instead, please initialize the Sentry Next.js SDK for the serverside in a
20+
[Next.js instrumentation hook](https://nextjs.org/docs/app/building-your-application/optimizing/instrumentation).
21+
**`sentry.client.config.ts|js` is still supported and encouraged for initializing the clientside SDK.** Please see the
22+
[Migration Guide](./MIGRATION.md#updated-the-recommended-way-of-calling-sentryinit) for more details.
23+
24+
In addition, the Next.js SDK now requires a minimum Next.js version of `13.2.0`.
25+
26+
### Removal/Refactoring of deprecated functionality
27+
28+
- feat(aws-serverless): Remove deprecated `rethrowAfterCapture` option (#11126)
29+
- feat(node): Remove deprecated/duplicate/unused definitions (#11120)
30+
- feat(v8): Remove deprecated integration methods on client (#11134)
31+
- feat(v8/browser): Remove class export for linked errors (#11129)
32+
- feat(v8/browser): Remove deprecated wrap export (#11127)
33+
- feat(v8/core): Remove deprecated client.setupIntegrations method (#11179)
34+
- feat(v8/core): Remove deprecated integration classes (#11132)
35+
- feat(v8/ember): Remove InitSentryForEmber export (#11202)
36+
- feat(v8/nextjs): Remove usage of class integrations (#11182)
37+
- feat(v8/replay): Delete deprecated types (#11177)
38+
- feat(v8/utils): Remove deprecated util functions (#11143)
39+
- ref(node): Remove class based export for local variable integration (#11128)
40+
41+
### Other Changes
42+
43+
- feat(browser): Make fetch the default transport for offline (#11209)
44+
- feat(core): Filter out noisy GoogleTag error by default (#11208)
45+
- feat(deps): Bump @sentry/cli from 2.30.0 to 2.30.2 (#11168)
46+
- feat(nextjs): Prefix webpack plugin log messages with runtime (#11173)
47+
- feat(node-profiling): Output ESM and remove Sentry deps from output (#11135)
48+
- feat(node): Allow Anr worker to be stopped and restarted (#11214)
49+
- feat(node): Support `tunnel` option for ANR (#11163)
50+
- feat(opentelemetry): Do not capture exceptions for timed events (#11221)
51+
- feat(serverless): Add Node.js 20 to compatible runtimes (#11103)
52+
- feat(sveltekit): Switch to Otel-based `@sentry/node` package (#11075)
53+
- fix(attachments): Add missing `view_hierarchy` attachment type (#11197)
54+
- fix(build): Ensure tree shaking works properly for ESM output (#11122)
55+
- fix(feedback): Only allow screenshots in secure contexts (#11188)
56+
- fix(feedback): Reduce force layout in screenshots (#11181)
57+
- fix(feedback): Smoother cropping experience and better UI (#11165)
58+
- fix(feedback): Fix screenshot black bars in Safari (#11233)
59+
- fix(metrics): use correct statsd data category (#11184)
60+
- fix(metrics): use web-vitals ttfb calculation (#11185)
61+
- fix(node): Export `initOpenTelemetry` (#11158)
62+
- fix(node): Clear ANR timer on stop (#11229)
63+
- fix(node): Time zone handling for `cron` (#11225)
64+
- fix(node): Use unique variable for ANR context transfer (#11161)
65+
- fix(opentelemetry): Do not stomp span error status (#11169)
66+
- fix(types): Fix incorrect `sampled` type on `Transaction` (#11115)
67+
768
## 8.0.0-alpha.4
869

970
This is the fourth Alpha release of the v8 cycle, which includes a variety of breaking changes.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2022 Functional Software, Inc. dba Sentry
3+
Copyright (c) 2024 Functional Software, Inc. dba Sentry
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of
66
this software and associated documentation files (the "Software"), to deal in

MIGRATION.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,18 @@ stable release of `8.x` comes out).
2424
to `@sentry/node` and all of our node-based server-side sdks (`@sentry/nextjs`, `@sentry/serverless`, etc.). We no
2525
longer test against Node 8, 10, or 12 and cannot guarantee that the SDK will work as expected on these versions.
2626

27-
**Browser**: Our browser SDKs (`@sentry/browser`, `@sentry/react`, `@sentry/vue`, etc.) now require ES2017+ compatible
27+
**Browser**: Our browser SDKs (`@sentry/browser`, `@sentry/react`, `@sentry/vue`, etc.) now require ES2018+ compatible
2828
browsers. This means that we no longer support IE11 (end of an era). This also means that the Browser SDK requires the
2929
fetch API to be available in the environment.
3030

3131
New minimum supported browsers:
3232

33-
- Chrome 58
34-
- Edge 15
35-
- Safari/iOS Safari 11
36-
- Firefox 54
37-
- Opera 45
38-
- Samsung Internet 7.2
33+
- Chrome 63
34+
- Edge 79
35+
- Safari/iOS Safari 12
36+
- Firefox 58
37+
- Opera 50
38+
- Samsung Internet 8.2
3939

4040
For IE11 support please transpile your code to ES5 using babel or similar and add required polyfills.
4141

@@ -577,6 +577,8 @@ Removed top-level exports: `Offline`, `makeXHRTransport`, `BrowserTracing`, `wra
577577
- [Removal of Offline integration](./MIGRATION.md#removal-of-the-offline-integration)
578578
- [Removal of `makeXHRTransport` transport](./MIGRATION.md#removal-of-makexhrtransport-transport)
579579
- [Removal of `wrap` method](./MIGRATION.md#removal-of-wrap-method)
580+
- [Removal of `@sentry/angular-ivy` package](./MIGRATION.md#removal-of-sentryangular-ivy-package)
581+
- [Removal of `@sentry/replay` package](./MIGRATION.md#removal-of-sentryreplay-package)
580582

581583
#### Removal of the `BrowserTracing` integration
582584

@@ -605,6 +607,10 @@ requires at least Angular 14. If you are using Angular 13 or lower, we suggest u
605607
migrating to v8. If you can't upgrade your Angular version to at least Angular 14, you can also continue using the
606608
`@sentry/angular-ivy@7` SDK. However, v7 of the SDKs will no longer be fully supported going forward.
607609

610+
#### Removal of `@sentry/replay` package
611+
612+
You can import from `@sentry/browser` (or from a respective SDK package like `@sentry/react` or `@sentry/vue`).
613+
608614
### Server-side SDKs (Node, Deno, Bun, etc.)
609615

610616
Removed top-level exports: `enableAnrDetection`, `Anr`, `deepReadDirSync`
@@ -907,6 +913,8 @@ SDK.
907913
- [Updated behaviour of `transactionContext` passed to `tracesSampler`](./MIGRATION.md#transactioncontext-no-longer-passed-to-tracessampler)
908914
- [Updated behaviour of `getClient()`](./MIGRATION.md#getclient-always-returns-a-client)
909915
- [Removal of Client-Side health check transaction filters](./MIGRATION.md#removal-of-client-side-health-check-transaction-filters)
916+
- [Change of Replay default options (`unblock` and `unmask`)](./MIGRATION.md#change-of-replay-default-options-unblock-and-unmask)
917+
- [Angular Tracing Decorator renaming](./MIGRATION.md#angular-tracing-decorator-renaming)
910918

911919
#### Updated behaviour of `tracePropagationTargets` in the browser (HTTP tracing headers & CORS)
912920

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ Besides the high-level SDKs, this repository contains shared packages, helpers a
9393
development. If you're thinking about contributing to or creating a JavaScript-based SDK, have a look at the resources
9494
below:
9595

96-
- [`@sentry/replay`](https://github.com/getsentry/sentry-javascript/tree/master/packages/replay): Provides the
97-
integration for Session Replay.
96+
- [`@sentry-internal/replay`](https://github.com/getsentry/sentry-javascript/tree/master/packages/replay-internal):
97+
Provides the integration for Session Replay.
9898
- [`@sentry/core`](https://github.com/getsentry/sentry-javascript/tree/master/packages/core): The base for all
9999
JavaScript SDKs with interfaces, type definitions and base classes.
100100
- [`@sentry/utils`](https://github.com/getsentry/sentry-javascript/tree/master/packages/utils): A set of helpers and

dev-packages/browser-integration-tests/suites/replay/bufferMode/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { expect } from '@playwright/test';
2-
import type { replayIntegration as actualReplayIntegration } from '@sentry/replay';
3-
import type { ReplayContainer } from '@sentry/replay/build/npm/types/types';
2+
import type { replayIntegration as actualReplayIntegration } from '@sentry-internal/replay';
3+
import type { ReplayContainer } from '@sentry-internal/replay/build/npm/types/types';
44

55
import { sentryTest } from '../../../utils/fixtures';
66
import { envelopeRequestParser, waitForErrorRequest } from '../../../utils/helpers';

dev-packages/browser-integration-tests/suites/replay/captureReplayFromReplayPackage/init.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
import { replayIntegration } from '@sentry-internal/replay';
12
import * as Sentry from '@sentry/browser';
2-
import { replayIntegration } from '@sentry/replay';
33

44
window.Sentry = Sentry;
55
window.Replay = replayIntegration({

dev-packages/browser-integration-tests/suites/replay/captureReplayFromReplayPackage/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { SDK_VERSION } from '@sentry/browser';
44
import { sentryTest } from '../../../utils/fixtures';
55
import { getReplayEvent, shouldSkipReplayTest, waitForReplayRequest } from '../../../utils/replayHelpers';
66

7-
sentryTest('should capture replays (@sentry/replay export)', async ({ getLocalTestPath, page }) => {
7+
sentryTest('should capture replays (@sentry-internal/replay export)', async ({ getLocalTestPath, page }) => {
88
if (shouldSkipReplayTest()) {
99
sentryTest.skip();
1010
}

dev-packages/browser-integration-tests/utils/generatePlugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ class SentryScenarioGenerationPlugin {
162162
? {
163163
// To help Webpack resolve Sentry modules in `import` statements in cases where they're provided in bundles rather than in `node_modules`
164164
'@sentry/browser': 'Sentry',
165-
'@sentry/replay': 'Sentry',
165+
'@sentry-internal/replay': 'Sentry',
166166
'@sentry/wasm': 'Sentry',
167167
}
168168
: {};

dev-packages/browser-integration-tests/utils/replayHelpers.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
import type { Page, Request, Response } from '@playwright/test';
22
/* eslint-disable max-lines */
33
import type { ReplayCanvasIntegrationOptions } from '@sentry-internal/replay-canvas';
4-
import type { fullSnapshotEvent, incrementalSnapshotEvent } from '@sentry-internal/rrweb';
5-
import { EventType } from '@sentry-internal/rrweb';
6-
import type { ReplayEventWithTime } from '@sentry/browser';
74
import type {
85
InternalEventContext,
96
RecordingEvent,
107
ReplayContainer,
118
ReplayPluginOptions,
129
Session,
13-
} from '@sentry/replay/build/npm/types/types';
10+
} from '@sentry-internal/replay/build/npm/types/types';
11+
import type { fullSnapshotEvent, incrementalSnapshotEvent } from '@sentry-internal/rrweb';
12+
import { EventType } from '@sentry-internal/rrweb';
13+
import type { ReplayEventWithTime } from '@sentry/browser';
1414
import type { Breadcrumb, Event, ReplayEvent, ReplayRecordingMode } from '@sentry/types';
1515
import pako from 'pako';
1616

dev-packages/e2e-tests/test-applications/create-next-app/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"compilerOptions": {
3-
"target": "es2017",
3+
"target": "es2018",
44
"lib": ["dom", "dom.iterable", "esnext"],
55
"allowJs": true,
66
"skipLibCheck": true,

dev-packages/e2e-tests/test-applications/create-react-app/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"compilerOptions": {
3-
"target": "es2017",
3+
"target": "es2018",
44
"lib": ["dom", "dom.iterable", "esnext"],
55
"allowJs": true,
66
"skipLibCheck": true,

dev-packages/e2e-tests/test-applications/generic-ts3.8/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1+
// biome-ignore lint/nursery/noUnusedImports:
2+
import * as _SentryReplay from '@sentry-internal/replay';
13
// biome-ignore lint/nursery/noUnusedImports: we need to import the SDK to ensure tsc check the types
24
import * as _SentryBrowser from '@sentry/browser';
35
// biome-ignore lint/nursery/noUnusedImports:
46
import * as _SentryCore from '@sentry/core';
57
// biome-ignore lint/nursery/noUnusedImports:
68
import * as _SentryNode from '@sentry/node';
79
// biome-ignore lint/nursery/noUnusedImports:
8-
import * as _SentryReplay from '@sentry/replay';
9-
// biome-ignore lint/nursery/noUnusedImports:
1010
import * as _SentryTypes from '@sentry/types';
1111
// biome-ignore lint/nursery/noUnusedImports:
1212
import * as _SentryUtils from '@sentry/utils';

dev-packages/e2e-tests/test-applications/generic-ts3.8/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"@sentry/browser": "latest || *",
1717
"@sentry/core": "latest || *",
1818
"@sentry/node": "latest || *",
19-
"@sentry/replay": "latest || *",
19+
"@sentry-internal/replay": "latest || *",
2020
"@sentry/types": "latest || *",
2121
"@sentry/utils": "latest || *",
2222
"@sentry/wasm": "latest || *"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"include": ["index.ts"],
33
"compilerOptions": {
4-
"lib": ["es2017", "DOM"],
4+
"lib": ["es2018", "DOM"],
55
"skipLibCheck": false,
66
"noEmit": true,
77
"types": [],
8-
"target": "es2017",
8+
"target": "es2018",
99
"moduleResolution": "node"
1010
}
1111
}

dev-packages/e2e-tests/test-applications/nextjs-14/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"compilerOptions": {
3-
"target": "es2017",
3+
"target": "es2018",
44
"lib": ["dom", "dom.iterable", "esnext"],
55
"allowJs": true,
66
"skipLibCheck": true,

dev-packages/e2e-tests/test-applications/nextjs-app-dir/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"compilerOptions": {
3-
"target": "es2017",
3+
"target": "es2018",
44
"lib": ["dom", "dom.iterable", "esnext"],
55
"allowJs": true,
66
"skipLibCheck": true,

dev-packages/e2e-tests/test-applications/node-exports-test-app/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"compilerOptions": {
33
"types": ["node"],
44
"esModuleInterop": true,
5-
"lib": ["es2017"],
5+
"lib": ["es2018"],
66
"strict": true,
77
"outDir": "dist",
88
"target": "ESNext",

dev-packages/e2e-tests/test-applications/node-express-app/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"compilerOptions": {
33
"types": ["node"],
44
"esModuleInterop": true,
5-
"lib": ["es2017"],
5+
"lib": ["es2018"],
66
"strict": true,
77
"outDir": "dist"
88
},

dev-packages/e2e-tests/test-applications/react-create-hash-router/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"compilerOptions": {
3-
"target": "es2017",
3+
"target": "es2018",
44
"lib": ["dom", "dom.iterable", "esnext"],
55
"allowJs": true,
66
"skipLibCheck": true,

dev-packages/e2e-tests/test-applications/react-router-6-use-routes/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"compilerOptions": {
3-
"target": "es2017",
3+
"target": "es2018",
44
"lib": ["dom", "dom.iterable", "esnext"],
55
"allowJs": true,
66
"skipLibCheck": true,

dev-packages/e2e-tests/test-applications/standard-frontend-react/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"compilerOptions": {
3-
"target": "es2017",
3+
"target": "es2018",
44
"lib": ["dom", "dom.iterable", "esnext"],
55
"allowJs": true,
66
"skipLibCheck": true,

dev-packages/e2e-tests/test-applications/sveltekit-2/src/routes/+page.svelte

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,7 @@
2626
<li>
2727
<a id="redirectLink" href="/redirect1">Redirect</a>
2828
</li>
29+
<li>
30+
<a href="/server-load-fetch">Route with nested fetch in server load</a>
31+
</li>
2932
</ul>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export const load = async ({ fetch }) => {
2+
const res = await fetch('/api/users');
3+
const data = await res.json();
4+
return { data };
5+
};
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<script lang="ts">
2+
export let data;
3+
</script>
4+
5+
<main>
6+
<h1>Server Load Fetch</h1>
7+
<p>{JSON.stringify(data, null, 2)}</p>
8+
</main>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import { expect, test } from '@playwright/test';
2+
import { waitForTransaction } from '../event-proxy-server';
3+
4+
test('server pageload request span has nested request span for sub request', async ({ page }) => {
5+
const serverTxnEventPromise = waitForTransaction('sveltekit-2', txnEvent => {
6+
return txnEvent?.transaction === 'GET /server-load-fetch';
7+
});
8+
9+
await page.goto('/server-load-fetch');
10+
11+
const serverTxnEvent = await serverTxnEventPromise;
12+
const spans = serverTxnEvent.spans;
13+
14+
expect(serverTxnEvent).toMatchObject({
15+
transaction: 'GET /server-load-fetch',
16+
tags: { runtime: 'node' },
17+
transaction_info: { source: 'route' },
18+
type: 'transaction',
19+
contexts: {
20+
trace: {
21+
op: 'http.server',
22+
origin: 'auto.http.sveltekit',
23+
},
24+
},
25+
});
26+
27+
expect(spans).toEqual(
28+
expect.arrayContaining([
29+
// load span where the server load function initiates the sub request:
30+
expect.objectContaining({ op: 'function.sveltekit.server.load', description: '/server-load-fetch' }),
31+
// sub request span:
32+
expect.objectContaining({ op: 'http.server', description: 'GET /api/users' }),
33+
]),
34+
);
35+
});

dev-packages/e2e-tests/test-applications/sveltekit/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"@sentry/utils": "latest || *",
2323
"@sveltejs/adapter-auto": "^2.0.0",
2424
"@sveltejs/adapter-node": "^1.2.4",
25-
"@sveltejs/kit": "^1.30.3",
25+
"@sveltejs/kit": "1.20.5",
2626
"svelte": "^3.54.0",
2727
"svelte-check": "^3.0.1",
2828
"ts-node": "10.9.1",

0 commit comments

Comments
 (0)