Skip to content

Commit b1a26c8

Browse files
authored
Merge pull request #13734 from getsentry/prepare-release/8.31.0
meta(changelog): Update changelog for 8.31.0
2 parents 13bd35b + 1914376 commit b1a26c8

File tree

89 files changed

+1331
-307
lines changed

Some content is hidden

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

89 files changed

+1331
-307
lines changed

.github/workflows/build.yml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -458,8 +458,7 @@ jobs:
458458
strategy:
459459
fail-fast: false
460460
matrix:
461-
# TODO(lforst): Unpin Node.js version 22 when https://github.com/protobufjs/protobuf.js/issues/2025 is resolved which broke the nodejs tests
462-
node: [14, 16, 18, 20, '22.6.0']
461+
node: [14, 16, 18, 20, 22]
463462
steps:
464463
- name: Check out base commit (${{ github.event.pull_request.base.sha }})
465464
uses: actions/checkout@v4
@@ -610,6 +609,13 @@ jobs:
610609
overwrite: true
611610
retention-days: 7
612611

612+
- name: Upload test results to Codecov
613+
if: cancelled() == false
614+
uses: codecov/test-results-action@v1
615+
with:
616+
directory: dev-packages/browser-integration-tests
617+
token: ${{ secrets.CODECOV_TOKEN }}
618+
613619
job_browser_loader_tests:
614620
name: PW ${{ matrix.bundle }} Tests
615621
needs: [job_get_metadata, job_build]
@@ -653,6 +659,7 @@ jobs:
653659
run: |
654660
cd dev-packages/browser-integration-tests
655661
yarn test:loader
662+
656663
- name: Upload Playwright Traces
657664
uses: actions/upload-artifact@v4
658665
if: failure()
@@ -662,6 +669,13 @@ jobs:
662669
overwrite: true
663670
retention-days: 7
664671

672+
- name: Upload test results to Codecov
673+
if: cancelled() == false
674+
uses: codecov/test-results-action@v1
675+
with:
676+
directory: dev-packages/browser-integration-tests
677+
token: ${{ secrets.CODECOV_TOKEN }}
678+
665679
job_check_for_faulty_dts:
666680
name: Check for faulty .d.ts files
667681
needs: [job_get_metadata, job_build]
@@ -1013,6 +1027,13 @@ jobs:
10131027
overwrite: true
10141028
retention-days: 7
10151029

1030+
- name: Upload test results to Codecov
1031+
if: cancelled() == false
1032+
uses: codecov/test-results-action@v1
1033+
with:
1034+
directory: dev-packages/e2e-tests
1035+
token: ${{ secrets.CODECOV_TOKEN }}
1036+
10161037
job_optional_e2e_tests:
10171038
name: E2E ${{ matrix.label || matrix.test-application }} Test
10181039
# We only run E2E tests for non-fork PRs because the E2E tests require secrets to work and they can't be accessed from forks

CHANGELOG.md

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,52 @@
1010

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

13+
## 8.31.0
14+
15+
### Important Changes
16+
17+
- **feat(node): Add `dataloader` integration (#13664)**
18+
19+
This release adds a new integration for the [`dataloader` package](https://www.npmjs.com/package/dataloader). The Node
20+
SDK (and all SDKs that depend on it) will now automatically instrument `dataloader` instances. You can also add it
21+
manually:
22+
23+
```js
24+
Sentry.init({
25+
integrations: [Sentry.dataloaderIntegration()],
26+
});
27+
```
28+
29+
### Other Changes
30+
31+
- feat(browser): Add navigation `activationStart` timestamp to pageload span (#13658)
32+
- feat(gatsby): Add optional `deleteSourcemapsAfterUpload` (#13610)
33+
- feat(nextjs): Give app router prefetch requests a `http.server.prefetch` op (#13600)
34+
- feat(nextjs): Improve Next.js serverside span data quality (#13652)
35+
- feat(node): Add `disableInstrumentationWarnings` option (#13693)
36+
- feat(nuxt): Adding `experimental_basicServerTracing` option to Nuxt module (#13643)
37+
- feat(nuxt): Improve logs about adding Node option 'import' (#13726)
38+
- feat(replay): Add `onError` callback + other small improvements to debugging (#13721)
39+
- feat(replay): Add experimental option to allow for a checkout every 6 minutes (#13069)
40+
- feat(wasm): Unconditionally parse instruction addresses (#13655)
41+
- fix: Ensure all logs are wrapped with `consoleSandbox` (#13690)
42+
- fix(browser): Try multiple options for `lazyLoadIntegration` script parent element lookup (#13717)
43+
- fix(feedback): Actor color applies to feedback icon (#13702)
44+
- fix(feedback): Fix form width on mobile devices (#13068)
45+
- fix(nestjs): Preserve original function name on `SentryTraced` functions (#13684)
46+
- fix(node): Don't overwrite local variables for re-thrown errors (#13644)
47+
- fix(normalize): Treat Infinity as NaN both are non-serializable numbers (#13406)
48+
- fix(nuxt): Use correct server output file path (#13725)
49+
- fix(opentelemetry): Always use active span in `Propagator.inject` (#13381)
50+
- fix(replay): Fixes potential out-of-order segments (#13609)
51+
52+
Work in this release was contributed by @KyGuy2002, @artzhookov, and @julianCast. Thank you for your contributions!
53+
1354
## 8.30.0
1455

1556
### Important Changes
1657

17-
- _feat(node): Add `kafkajs` integration (#13528)_
58+
- **feat(node): Add `kafkajs` integration (#13528)**
1859

1960
This release adds a new integration that instruments `kafkajs` library with spans and traces. This integration is
2061
automatically enabled by default, but can be included with the `Sentry.kafkaIntegration()` import.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ package. Please refer to the README and instructions of those SDKs for more deta
7171
for native crashes
7272
- [`@sentry/bun`](https://github.com/getsentry/sentry-javascript/tree/master/packages/bun): SDK for Bun
7373
- [`@sentry/deno`](https://github.com/getsentry/sentry-javascript/tree/master/packages/deno): SDK for Deno
74+
- [`@sentry/cloudflare`](https://github.com/getsentry/sentry-javascript/tree/master/packages/cloudflare): SDK for
75+
Cloudflare
7476

7577
## Version Support Policy
7678

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"test:loader:replay_buffer": "PW_BUNDLE=loader_replay_buffer yarn test:loader",
3636
"test:loader:full": "PW_BUNDLE=loader_tracing_replay yarn test:loader",
3737
"test:loader:debug": "PW_BUNDLE=loader_debug yarn test:loader",
38-
"test:ci": "yarn test:all --reporter='line'",
38+
"test:ci": "yarn test:all",
3939
"test:update-snapshots": "yarn test:all --update-snapshots",
4040
"test:detect-flaky": "ts-node scripts/detectFlakyTests.ts"
4141
},

dev-packages/browser-integration-tests/playwright.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ const config: PlaywrightTestConfig = {
3030
},
3131
],
3232

33+
reporter: process.env.CI ? [['line'], ['junit', { outputFile: 'results.junit.xml' }]] : 'list',
34+
3335
globalSetup: require.resolve('./playwright.setup.ts'),
3436
globalTeardown: require.resolve('./playwright.teardown.ts'),
3537
};

dev-packages/browser-integration-tests/suites/public-api/setExtras/consecutive_calls/test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,10 @@ sentryTest('should set extras from multiple consecutive calls', async ({ getLoca
1010
const eventData = await getFirstSentryEnvelopeRequest<Event>(page, url);
1111

1212
expect(eventData.message).toBe('consecutive_calls');
13-
expect(eventData.extra).toMatchObject({ extra: [], Infinity: 2, null: null, obj: { foo: ['bar', 'baz', 1] } });
13+
expect(eventData.extra).toMatchObject({
14+
extra: [],
15+
Infinity: 2,
16+
null: '[Infinity]',
17+
obj: { foo: ['bar', 'baz', 1] },
18+
});
1419
});

dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals/test.ts

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -59,23 +59,30 @@ sentryTest('paint web vitals values are greater than TTFB', async ({ browserName
5959
expect(fpValue).toBeGreaterThanOrEqual(ttfbValue!);
6060
});
6161

62-
sentryTest('captures time origin as span attribute', async ({ getLocalTestPath, page }) => {
63-
// Only run in chromium to ensure all vitals are present
64-
if (shouldSkipTracingTest()) {
65-
sentryTest.skip();
66-
}
62+
sentryTest(
63+
'captures time origin and navigation activationStart as span attributes',
64+
async ({ getLocalTestPath, page }) => {
65+
// Only run in chromium to ensure all vitals are present
66+
if (shouldSkipTracingTest()) {
67+
sentryTest.skip();
68+
}
6769

68-
const url = await getLocalTestPath({ testDir: __dirname });
69-
const [eventData] = await Promise.all([getFirstSentryEnvelopeRequest<Event>(page), page.goto(url)]);
70+
const url = await getLocalTestPath({ testDir: __dirname });
71+
const [eventData] = await Promise.all([getFirstSentryEnvelopeRequest<Event>(page), page.goto(url)]);
7072

71-
const timeOriginAttribute = eventData.contexts?.trace?.data?.['performance.timeOrigin'];
72-
const transactionStartTimestamp = eventData.start_timestamp;
73+
const timeOriginAttribute = eventData.contexts?.trace?.data?.['performance.timeOrigin'];
74+
const activationStart = eventData.contexts?.trace?.data?.['performance.activationStart'];
7375

74-
expect(timeOriginAttribute).toBeDefined();
75-
expect(transactionStartTimestamp).toBeDefined();
76+
const transactionStartTimestamp = eventData.start_timestamp;
7677

77-
const delta = Math.abs(transactionStartTimestamp! - timeOriginAttribute);
78+
expect(timeOriginAttribute).toBeDefined();
79+
expect(transactionStartTimestamp).toBeDefined();
7880

79-
// The delta should be less than 1ms if this flakes, we should increase the threshold
80-
expect(delta).toBeLessThanOrEqual(1);
81-
});
81+
const delta = Math.abs(transactionStartTimestamp! - timeOriginAttribute);
82+
83+
// The delta should be less than 1ms if this flakes, we should increase the threshold
84+
expect(delta).toBeLessThanOrEqual(1);
85+
86+
expect(activationStart).toBeGreaterThanOrEqual(0);
87+
},
88+
);

dev-packages/e2e-tests/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"test:prepare": "ts-node prepare.ts",
1515
"test:validate": "run-s test:validate-configuration test:validate-test-app-setups",
1616
"clean": "rimraf tmp node_modules pnpm-lock.yaml && yarn clean:test-applications",
17-
"clean:test-applications": "rimraf test-applications/**/{node_modules,dist,build,.next,.sveltekit,pnpm-lock.yaml} .last-run.json && pnpm store prune"
17+
"clean:test-applications": "rimraf --glob test-applications/**/{node_modules,dist,build,.next,.sveltekit,pnpm-lock.yaml} .last-run.json && pnpm store prune"
1818
},
1919
"devDependencies": {
2020
"@types/glob": "8.0.0",

dev-packages/e2e-tests/test-applications/ember-classic/playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const config: PlaywrightTestConfig = {
3535
forbidOnly: !!process.env.CI,
3636
retries: 0,
3737
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
38-
reporter: 'list',
38+
reporter: process.env.CI ? [['line'], ['junit', { outputFile: 'results.junit.xml' }]] : 'list',
3939
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
4040
use: {
4141
/* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */

dev-packages/e2e-tests/test-applications/ember-embroider/playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const config: PlaywrightTestConfig = {
3535
forbidOnly: !!process.env.CI,
3636
retries: 0,
3737
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
38-
reporter: 'list',
38+
reporter: process.env.CI ? [['line'], ['junit', { outputFile: 'results.junit.xml' }]] : 'list',
3939
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
4040
use: {
4141
/* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */

dev-packages/e2e-tests/test-applications/nestjs-basic/src/app.controller.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,4 +116,9 @@ export class AppController {
116116
testServiceWithCanActivate() {
117117
return this.appService.canActivate();
118118
}
119+
120+
@Get('test-function-name')
121+
testFunctionName() {
122+
return this.appService.getFunctionName();
123+
}
119124
}

dev-packages/e2e-tests/test-applications/nestjs-basic/src/app.service.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ export class AppService {
5858
return { result: 'test' };
5959
}
6060

61+
@SentryTraced('return the function name')
62+
getFunctionName(): { result: string } {
63+
return { result: this.getFunctionName.name };
64+
}
65+
6166
async testSpanDecoratorSync() {
6267
const returned = this.getString();
6368
// Will fail if getString() is async, because returned will be a Promise<>

dev-packages/e2e-tests/test-applications/nestjs-basic/tests/span-decorator.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,10 @@ test('Transaction includes span and correct value for decorated sync function',
7070
]),
7171
);
7272
});
73+
74+
test('preserves original function name on decorated functions', async ({ baseURL }) => {
75+
const response = await fetch(`${baseURL}/test-function-name`);
76+
const body = await response.json();
77+
78+
expect(body.result).toEqual('getFunctionName');
79+
});

dev-packages/e2e-tests/test-applications/nextjs-14/tests/generation-functions.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ test('Should emit a span for a generateMetadata() function invokation', async ({
1717
expect(transaction.spans).toContainEqual(
1818
expect.objectContaining({
1919
description: 'generateMetadata /generation-functions/page',
20-
origin: 'manual',
20+
origin: 'auto',
2121
parent_span_id: expect.any(String),
2222
span_id: expect.any(String),
2323
status: 'ok',
@@ -74,7 +74,7 @@ test('Should send a transaction event for a generateViewport() function invokati
7474
expect((await transactionPromise).spans).toContainEqual(
7575
expect.objectContaining({
7676
description: 'generateViewport /generation-functions/page',
77-
origin: 'manual',
77+
origin: 'auto',
7878
parent_span_id: expect.any(String),
7979
span_id: expect.any(String),
8080
status: 'ok',

dev-packages/e2e-tests/test-applications/node-express-cjs-preload/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"dependencies": {
1212
"@sentry/node": "latest || *",
1313
"@sentry/opentelemetry": "latest || *",
14-
"express": "4.19.2"
14+
"express": "4.20.0"
1515
},
1616
"devDependencies": {
1717
"@playwright/test": "^1.44.1",

dev-packages/e2e-tests/test-applications/node-express-esm-loader/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"dependencies": {
1212
"@sentry/node": "latest || *",
1313
"@sentry/opentelemetry": "latest || *",
14-
"express": "4.19.2"
14+
"express": "4.20.0"
1515
},
1616
"devDependencies": {
1717
"@playwright/test": "^1.44.1",

dev-packages/e2e-tests/test-applications/node-express-esm-preload/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"dependencies": {
1212
"@sentry/node": "latest || *",
1313
"@sentry/opentelemetry": "latest || *",
14-
"express": "4.19.2"
14+
"express": "4.20.0"
1515
},
1616
"devDependencies": {
1717
"@playwright/test": "^1.44.1",

dev-packages/e2e-tests/test-applications/node-express-esm-without-loader/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"dependencies": {
1212
"@sentry/node": "latest || *",
1313
"@sentry/opentelemetry": "latest || *",
14-
"express": "4.19.2"
14+
"express": "4.20.0"
1515
},
1616
"devDependencies": {
1717
"@playwright/test": "^1.44.1",

dev-packages/e2e-tests/test-applications/node-express-incorrect-instrumentation/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"@trpc/client": "10.45.2",
1919
"@types/express": "4.17.17",
2020
"@types/node": "18.15.1",
21-
"express": "4.19.2",
21+
"express": "4.20.0",
2222
"typescript": "4.9.5",
2323
"zod": "~3.22.4"
2424
},

dev-packages/e2e-tests/test-applications/node-express-send-to-sentry/playwright.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const config = {
2323
/* Retry on CI only */
2424
retries: 0,
2525
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
26-
reporter: 'list',
26+
reporter: process.env.CI ? [['line'], ['junit', { outputFile: 'results.junit.xml' }]] : 'list',
2727
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
2828
use: {
2929
/* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"@trpc/client": "10.45.2",
1919
"@types/express": "4.17.17",
2020
"@types/node": "18.15.1",
21-
"express": "4.19.2",
21+
"express": "4.20.0",
2222
"typescript": "4.9.5",
2323
"zod": "~3.22.4"
2424
},

dev-packages/e2e-tests/test-applications/nuxt-3/sentry.client.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ Sentry.init({
66
dsn: useRuntimeConfig().public.sentry.dsn,
77
tunnel: `http://localhost:3031/`, // proxy server
88
tracesSampleRate: 1.0,
9+
trackComponents: true,
910
});

dev-packages/e2e-tests/test-applications/nuxt-3/tests/performance.client.test.ts

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

0 commit comments

Comments
 (0)