Skip to content

Commit 2e97a27

Browse files
authored
Merge pull request #16265 from getsentry/prepare-release/9.18.0
meta(changelog): Update changelog for 9.18.0
2 parents 4f4eb37 + 8dc4161 commit 2e97a27

File tree

141 files changed

+9510
-1274
lines changed

Some content is hidden

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

141 files changed

+9510
-1274
lines changed

.github/workflows/build.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ jobs:
475475
strategy:
476476
fail-fast: false
477477
matrix:
478-
node: [18, 20, 22]
478+
node: [18, 20, 22, '^24.0.1']
479479
steps:
480480
- name: Check out base commit (${{ github.event.pull_request.base.sha }})
481481
uses: actions/checkout@v4
@@ -713,12 +713,12 @@ jobs:
713713
strategy:
714714
fail-fast: false
715715
matrix:
716-
node: ['18.20.5', 20, 22]
716+
node: ['18.20.5', 20, 22, 24]
717717
typescript:
718718
- false
719719
include:
720720
# Only check typescript for latest version (to streamline CI)
721-
- node: 22
721+
- node: 24
722722
typescript: '3.8'
723723
steps:
724724
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
@@ -760,7 +760,7 @@ jobs:
760760
strategy:
761761
fail-fast: false
762762
matrix:
763-
node: [18, 20, 22]
763+
node: [18, 20, 22, 24]
764764
steps:
765765
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
766766
uses: actions/checkout@v4

.size-limit.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ module.exports = [
5454
path: 'packages/browser/build/npm/esm/index.js',
5555
import: createImport('init', 'browserTracingIntegration', 'replayIntegration'),
5656
gzip: true,
57-
limit: '70 KB',
57+
limit: '70.1 KB',
5858
modifyWebpackConfig: function (config) {
5959
const webpack = require('webpack');
6060
const TerserPlugin = require('terser-webpack-plugin');

CHANGELOG.md

+21
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,27 @@
1010

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

13+
## 9.18.0
14+
15+
### Important changes
16+
17+
- **feat: Support Node 24 ([#16236](https://github.com/getsentry/sentry-javascript/pull/16236))**
18+
19+
We now also publish profiling binaries for Node 24.
20+
21+
### Other changes
22+
23+
- deps(node): Bump `import-in-the-middle` to `1.13.1` ([#16260](https://github.com/getsentry/sentry-javascript/pull/16260))
24+
- feat: Export `consoleLoggingIntegration` from vercel edge sdk ([#16228](https://github.com/getsentry/sentry-javascript/pull/16228))
25+
- feat(cloudflare): Add support for email, queue, and tail handler ([#16233](https://github.com/getsentry/sentry-javascript/pull/16233))
26+
- feat(cloudflare): Improve http span data ([#16232](https://github.com/getsentry/sentry-javascript/pull/16232))
27+
- feat(nextjs): Add more attributes for generation functions ([#16214](https://github.com/getsentry/sentry-javascript/pull/16214))
28+
- feat(opentelemetry): Widen peer dependencies to support Otel v2 ([#16246](https://github.com/getsentry/sentry-javascript/pull/16246))
29+
- fix(core): Gracefully handle invalid baggage entries ([#16257](https://github.com/getsentry/sentry-javascript/pull/16257))
30+
- fix(node): Ensure traces are propagated without spans in Node 22+ ([#16221](https://github.com/getsentry/sentry-javascript/pull/16221))
31+
- fix(node): Use sentry forked `@fastify/otel` dependency with pinned Otel v1 deps ([#16256](https://github.com/getsentry/sentry-javascript/pull/16256))
32+
- fix(remix): Remove vendored types ([#16218](https://github.com/getsentry/sentry-javascript/pull/16218))
33+
1334
## 9.17.0
1435

1536
- feat(node): Migrate to `@fastify/otel` ([#15542](https://github.com/getsentry/sentry-javascript/pull/15542))

dev-packages/e2e-tests/test-applications/nextjs-app-dir/tests/server-components.test.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ test('Should set a "not_found" status on a server component span when notFound()
8080
op: 'function.nextjs',
8181
status: 'not_found',
8282
data: expect.objectContaining({
83-
'sentry.nextjs.function.type': 'Page',
84-
'sentry.nextjs.function.route': '/server-component/not-found',
83+
'sentry.nextjs.ssr.function.type': 'Page',
84+
'sentry.nextjs.ssr.function.route': '/server-component/not-found',
8585
}),
8686
}),
8787
);
@@ -112,8 +112,8 @@ test('Should capture an error and transaction for a app router page', async ({ p
112112
op: 'function.nextjs',
113113
status: 'internal_error',
114114
data: expect.objectContaining({
115-
'sentry.nextjs.function.type': 'Page',
116-
'sentry.nextjs.function.route': '/server-component/faulty',
115+
'sentry.nextjs.ssr.function.type': 'Page',
116+
'sentry.nextjs.ssr.function.route': '/server-component/faulty',
117117
}),
118118
}),
119119
);

dev-packages/e2e-tests/test-applications/nextjs-turbo/package.json

+1-5
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,7 @@
3535
"@sentry/opentelemetry": "latest || *",
3636
"@sentry/react": "latest || *",
3737
"@sentry-internal/replay": "latest || *",
38-
"@sentry/vercel-edge": "latest || *",
39-
"import-in-the-middle": "1.12.0"
40-
},
41-
"overrides": {
42-
"import-in-the-middle": "1.12.0"
38+
"@sentry/vercel-edge": "latest || *"
4339
},
4440
"volta": {
4541
"extends": "../../package.json"

dev-packages/node-integration-tests/.eslintrc.js

+3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ module.exports = {
1818
sourceType: 'module',
1919
ecmaVersion: 'latest',
2020
},
21+
globals: {
22+
fetch: 'readonly',
23+
},
2124
rules: {
2225
'@typescript-eslint/typedef': 'off',
2326
// Explicitly allow ts-ignore with description for Node integration tests

dev-packages/node-integration-tests/suites/esm/warn-esm/test.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ afterAll(() => {
55
cleanupChildProcesses();
66
});
77

8-
const esmWarning =
9-
'[Sentry] You are using Node.js in ESM mode ("import syntax"). The Sentry Node.js SDK is not compatible with ESM in Node.js versions before 18.19.0 or before 20.6.0. Please either build your application with CommonJS ("require() syntax"), or upgrade your Node.js version.';
8+
const esmWarning = `[Sentry] You are using Node.js v${process.versions.node} in ESM mode ("import syntax"). The Sentry Node.js SDK is not compatible with ESM in Node.js versions before 18.19.0 or before 20.6.0. Please either build your application with CommonJS ("require() syntax"), or upgrade your Node.js version.`;
109

1110
test("warns if using ESM on Node.js versions that don't support `register()`", async () => {
1211
const nodeMajorVersion = Number(process.versions.node.split('.')[0]);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import * as Sentry from '@sentry/node';
2+
import { loggingTransport } from '@sentry-internal/node-integration-tests';
3+
4+
Sentry.init({
5+
dsn: 'https://[email protected]/1337',
6+
release: '1.0',
7+
tracePropagationTargets: [/\/v0/, 'v1'],
8+
integrations: [],
9+
transport: loggingTransport,
10+
tracesSampleRate: 0.0,
11+
// Ensure this gets a correct hint
12+
beforeBreadcrumb(breadcrumb, hint) {
13+
breadcrumb.data = breadcrumb.data || {};
14+
const req = hint?.request;
15+
breadcrumb.data.ADDED_PATH = req?.path;
16+
return breadcrumb;
17+
},
18+
});
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
11
import * as Sentry from '@sentry/node';
2-
import { loggingTransport } from '@sentry-internal/node-integration-tests';
32

4-
Sentry.init({
5-
dsn: 'https://[email protected]/1337',
6-
release: '1.0',
7-
tracePropagationTargets: [/\/v0/, 'v1'],
8-
tracesSampleRate: 1.0,
9-
integrations: [],
10-
transport: loggingTransport,
11-
});
3+
async function run() {
4+
Sentry.addBreadcrumb({ message: 'manual breadcrumb' });
125

13-
async function run(): Promise<void> {
146
await fetch(`${process.env.SERVER_URL}/api/v0`).then(res => res.text());
157
await fetch(`${process.env.SERVER_URL}/api/v1`).then(res => res.text());
168
await fetch(`${process.env.SERVER_URL}/api/v2`).then(res => res.text());
@@ -19,5 +11,4 @@ async function run(): Promise<void> {
1911
Sentry.captureException(new Error('foo'));
2012
}
2113

22-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
2314
run();

dev-packages/node-integration-tests/suites/tracing/requests/fetch-breadcrumbs/scenario.ts

-34
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,80 @@
1-
import { describe, expect, test } from 'vitest';
2-
import { createRunner } from '../../../../utils/runner';
1+
import { describe, expect } from 'vitest';
2+
import { createEsmAndCjsTests } from '../../../../utils/runner';
33
import { createTestServer } from '../../../../utils/server';
44

55
describe('outgoing fetch', () => {
6-
test('outgoing fetch requests create breadcrumbs', async () => {
7-
const [SERVER_URL, closeTestServer] = await createTestServer().start();
6+
createEsmAndCjsTests(__dirname, 'scenario.mjs', 'instrument.mjs', (createRunner, test) => {
7+
test('outgoing fetch requests create breadcrumbs xxx', async () => {
8+
const [SERVER_URL, closeTestServer] = await createTestServer().start();
89

9-
await createRunner(__dirname, 'scenario.ts')
10-
.withEnv({ SERVER_URL })
11-
.ensureNoErrorOutput()
12-
.expect({
13-
event: {
14-
breadcrumbs: [
15-
{
16-
message: 'manual breadcrumb',
17-
timestamp: expect.any(Number),
18-
},
19-
{
20-
category: 'http',
21-
data: {
22-
'http.method': 'GET',
23-
url: `${SERVER_URL}/api/v0`,
24-
status_code: 404,
25-
ADDED_PATH: '/api/v0',
10+
await createRunner()
11+
.withEnv({ SERVER_URL })
12+
.expect({
13+
event: {
14+
breadcrumbs: [
15+
{
16+
message: 'manual breadcrumb',
17+
timestamp: expect.any(Number),
2618
},
27-
timestamp: expect.any(Number),
28-
type: 'http',
29-
},
30-
{
31-
category: 'http',
32-
data: {
33-
'http.method': 'GET',
34-
url: `${SERVER_URL}/api/v1`,
35-
status_code: 404,
36-
ADDED_PATH: '/api/v1',
19+
{
20+
category: 'http',
21+
data: {
22+
'http.method': 'GET',
23+
url: `${SERVER_URL}/api/v0`,
24+
status_code: 404,
25+
ADDED_PATH: '/api/v0',
26+
},
27+
timestamp: expect.any(Number),
28+
type: 'http',
3729
},
38-
timestamp: expect.any(Number),
39-
type: 'http',
40-
},
41-
{
42-
category: 'http',
43-
data: {
44-
'http.method': 'GET',
45-
url: `${SERVER_URL}/api/v2`,
46-
status_code: 404,
47-
ADDED_PATH: '/api/v2',
30+
{
31+
category: 'http',
32+
data: {
33+
'http.method': 'GET',
34+
url: `${SERVER_URL}/api/v1`,
35+
status_code: 404,
36+
ADDED_PATH: '/api/v1',
37+
},
38+
timestamp: expect.any(Number),
39+
type: 'http',
4840
},
49-
timestamp: expect.any(Number),
50-
type: 'http',
51-
},
52-
{
53-
category: 'http',
54-
data: {
55-
'http.method': 'GET',
56-
url: `${SERVER_URL}/api/v3`,
57-
status_code: 404,
58-
ADDED_PATH: '/api/v3',
41+
{
42+
category: 'http',
43+
data: {
44+
'http.method': 'GET',
45+
url: `${SERVER_URL}/api/v2`,
46+
status_code: 404,
47+
ADDED_PATH: '/api/v2',
48+
},
49+
timestamp: expect.any(Number),
50+
type: 'http',
5951
},
60-
timestamp: expect.any(Number),
61-
type: 'http',
62-
},
63-
],
64-
exception: {
65-
values: [
6652
{
67-
type: 'Error',
68-
value: 'foo',
53+
category: 'http',
54+
data: {
55+
'http.method': 'GET',
56+
url: `${SERVER_URL}/api/v3`,
57+
status_code: 404,
58+
ADDED_PATH: '/api/v3',
59+
},
60+
timestamp: expect.any(Number),
61+
type: 'http',
6962
},
7063
],
64+
exception: {
65+
values: [
66+
{
67+
type: 'Error',
68+
value: 'foo',
69+
},
70+
],
71+
},
7172
},
72-
},
73-
})
74-
.start()
75-
.completed();
76-
closeTestServer();
73+
})
74+
.start()
75+
.completed();
76+
77+
closeTestServer();
78+
});
7779
});
7880
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import * as Sentry from '@sentry/node';
2+
import { loggingTransport } from '@sentry-internal/node-integration-tests';
3+
4+
Sentry.init({
5+
dsn: 'https://[email protected]/1337',
6+
release: '1.0',
7+
tracePropagationTargets: [/\/v0/, 'v1'],
8+
integrations: [Sentry.nativeNodeFetchIntegration({ spans: false })],
9+
transport: loggingTransport,
10+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import * as Sentry from '@sentry/node';
2+
3+
async function run() {
4+
await fetch(`${process.env.SERVER_URL}/api/v0`).then(res => res.text());
5+
await fetch(`${process.env.SERVER_URL}/api/v1`).then(res => res.text());
6+
await fetch(`${process.env.SERVER_URL}/api/v2`).then(res => res.text());
7+
await fetch(`${process.env.SERVER_URL}/api/v3`).then(res => res.text());
8+
9+
Sentry.captureException(new Error('foo'));
10+
}
11+
12+
run();

dev-packages/node-integration-tests/suites/tracing/requests/fetch-no-tracing-no-spans/scenario.ts

-24
This file was deleted.

0 commit comments

Comments
 (0)