Skip to content

Commit eef19e7

Browse files
authored
Merge pull request #12749 from getsentry/prepare-release/8.14.0
meta(changelog): Update changelog for 8.14.0
2 parents c1b9e8f + 869a0d2 commit eef19e7

File tree

118 files changed

+3181
-812
lines changed

Some content is hidden

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

118 files changed

+3181
-812
lines changed

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,12 @@ body:
3939
- '@sentry/ember'
4040
- '@sentry/gatsby'
4141
- '@sentry/google-cloud-serverless'
42+
- '@sentry/nestjs'
4243
- '@sentry/nextjs'
4344
- '@sentry/node'
4445
- '@sentry/react'
4546
- '@sentry/remix'
47+
- '@sentry/solid'
4648
- '@sentry/svelte'
4749
- '@sentry/sveltekit'
4850
- '@sentry/vue'
@@ -56,7 +58,7 @@ body:
5658
attributes:
5759
label: SDK Version
5860
description: What version of the SDK are you using?
59-
placeholder: ex. 7.8.0
61+
placeholder: ex. 8.10.0
6062
validations:
6163
required: true
6264
- type: input
@@ -66,7 +68,7 @@ body:
6668
description:
6769
If you're using one of our framework-specific SDKs (`@sentry/react`, for example), what version of the
6870
_framework_ are you using?
69-
placeholder: ex. React 17.0.0
71+
placeholder: ex. React 18.3.0 or Next 14.0.0
7072
- type: input
7173
id: link-to-sentry
7274
attributes:
@@ -78,8 +80,10 @@ body:
7880
- type: textarea
7981
id: sdk-setup
8082
attributes:
81-
label: SDK Setup
82-
description: How do you set up your Sentry SDK? Please show us your `Sentry.init` options.
83+
label: SDK Setup/Reproduction Example
84+
description:
85+
How do you set up your Sentry SDK? Please show us your `Sentry.init` code.
86+
Or even better—share a link to a reproduction example.
8387
placeholder: |-
8488
```javascript
8589
Sentry.init({

.github/workflows/build.yml

Lines changed: 4 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -229,44 +229,6 @@ jobs:
229229
message: |
230230
⚠️ This PR is opened against **master**. You probably want to open it against **develop**.
231231
232-
job_external_contributor:
233-
name: External Contributors
234-
needs: job_install_deps
235-
runs-on: ubuntu-20.04
236-
if: |
237-
github.event_name == 'pull_request'
238-
&& (github.event.action == 'opened' || github.event.action == 'reopened')
239-
&& github.event.pull_request.author_association != 'COLLABORATOR'
240-
&& github.event.pull_request.author_association != 'MEMBER'
241-
&& github.event.pull_request.author_association != 'OWNER'
242-
steps:
243-
- uses: actions/checkout@v4
244-
with:
245-
ref: ${{ github.head_ref }}
246-
- name: Set up Node
247-
uses: actions/setup-node@v4
248-
with:
249-
node-version-file: 'package.json'
250-
- name: Check dependency cache
251-
uses: actions/cache/restore@v4
252-
with:
253-
path: ${{ env.CACHED_DEPENDENCY_PATHS }}
254-
key: ${{ needs.job_install_deps.outputs.dependency_cache_key }}
255-
fail-on-cache-miss: true
256-
257-
- name: Add external contributor to CHANGELOG.md
258-
uses: ./dev-packages/external-contributor-gh-action
259-
with:
260-
name: ${{ github.event.pull_request.user.login }}
261-
- name: Create PR with changes
262-
uses: peter-evans/create-pull-request@v6
263-
with:
264-
commit-message: "ref: Add external contributor to CHANGELOG.md"
265-
title: "ref: Add external contributor to CHANGELOG.md"
266-
branch: 'external-contributor/patch-${{ github.event.pull_request.user.login }}'
267-
delete-branch: true
268-
body: This PR adds the external contributor to the CHANGELOG.md file, so that they are credited for their contribution.
269-
270232
job_build:
271233
name: Build
272234
needs: [job_get_metadata, job_install_deps]
@@ -502,7 +464,7 @@ jobs:
502464
with:
503465
node-version-file: 'package.json'
504466
- name: Set up Bun
505-
uses: oven-sh/setup-bun@v1
467+
uses: oven-sh/setup-bun@v2
506468
- name: Restore caches
507469
uses: ./.github/actions/restore-cache
508470
env:
@@ -761,6 +723,7 @@ jobs:
761723
- loader_debug
762724
- loader_tracing
763725
- loader_replay
726+
- loader_replay_buffer
764727
- loader_tracing_replay
765728

766729
steps:
@@ -1050,6 +1013,7 @@ jobs:
10501013
'node-express-esm-preload',
10511014
'node-express-esm-without-loader',
10521015
'node-express-cjs-preload',
1016+
'node-otel-sdk-node',
10531017
'nextjs-app-dir',
10541018
'nextjs-14',
10551019
'nextjs-15',
@@ -1112,7 +1076,7 @@ jobs:
11121076
node-version-file: 'dev-packages/e2e-tests/package.json'
11131077
- name: Set up Bun
11141078
if: matrix.test-application == 'node-exports-test-app'
1115-
uses: oven-sh/setup-bun@v1
1079+
uses: oven-sh/setup-bun@v2
11161080
- name: Restore caches
11171081
uses: ./.github/actions/restore-cache
11181082
env:
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: "CI: Mention external contributors"
2+
on:
3+
pull_request:
4+
types:
5+
- closed
6+
branches:
7+
- develop
8+
9+
jobs:
10+
external_contributor:
11+
name: External Contributors
12+
runs-on: ubuntu-20.04
13+
if: |
14+
github.event.pull_request.author_association != 'COLLABORATOR'
15+
&& github.event.pull_request.author_association != 'MEMBER'
16+
&& github.event.pull_request.author_association != 'OWNER'
17+
&& github.actor != 'dependabot[bot]'
18+
steps:
19+
- uses: actions/checkout@v4
20+
with:
21+
ref: ${{ github.head_ref }}
22+
- name: Set up Node
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version-file: 'package.json'
26+
cache: 'yarn'
27+
28+
- name: Install dependencies
29+
run: yarn install --frozen-lockfile
30+
31+
- name: Add external contributor to CHANGELOG.md
32+
uses: ./dev-packages/external-contributor-gh-action
33+
with:
34+
name: ${{ github.event.pull_request.user.login }}
35+
- name: Create PR with changes
36+
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c
37+
with:
38+
commit-message: "ref: Add external contributor to CHANGELOG.md"
39+
title: "ref: Add external contributor to CHANGELOG.md"
40+
branch: 'external-contributor/patch-${{ github.event.pull_request.user.login }}'
41+
base: 'develop'
42+
delete-branch: true
43+
body: This PR adds the external contributor to the CHANGELOG.md file, so that they are credited for their contribution.
44+

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,36 @@
11
# Changelog
22

3+
> [!IMPORTANT]
4+
> If you are upgrading to the `8.x` versions of the SDK from `7.x` or below, make sure you follow our
5+
> [migration guide](https://docs.sentry.io/platforms/javascript/migration/) first.
6+
37
## Unreleased
48

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

11+
## 8.14.0
12+
13+
### Important Changes
14+
15+
- **feat(nestjs): Filter 4xx errors (#12695)**
16+
17+
The `@sentry/nestjs` SDK no longer captures 4xx errors automatically.
18+
19+
### Other Changes
20+
21+
- chore(react): Remove private namespace `JSX` (#12691)
22+
- feat(deps): bump @opentelemetry/propagator-aws-xray from 1.25.0 to 1.25.1 (#12719)
23+
- feat(deps): bump @prisma/instrumentation from 5.16.0 to 5.16.1 (#12718)
24+
- feat(node): Add `registerEsmLoaderHooks` option (#12684)
25+
- feat(opentelemetry): Expose sampling helper (#12674)
26+
- fix(browser): Make sure measure spans have valid start timestamps (#12648)
27+
- fix(hapi): Widen type definitions (#12710)
28+
- fix(nextjs): Attempt to ignore critical dependency warnings (#12694)
29+
- fix(react): Fix React jsx runtime import for esm (#12740)
30+
- fix(replay): Start replay in `afterAllSetup` instead of next tick (#12709)
31+
32+
Work in this release was contributed by @quisido. Thank you for your contribution!
33+
734
## 8.13.0
835

936
### Important Changes

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@ import { expect } from '@playwright/test';
33
import { sentryTest } from '../../../../utils/fixtures';
44
import { getReplayEvent, shouldSkipReplayTest, waitForReplayRequest } from '../../../../utils/replayHelpers';
55

6+
const bundle = process.env.PW_BUNDLE || '';
7+
68
sentryTest('should capture a replay', async ({ getLocalTestUrl, page }) => {
7-
if (shouldSkipReplayTest()) {
9+
// When in buffer mode, there will not be a replay by default
10+
if (shouldSkipReplayTest() || bundle === 'loader_replay_buffer') {
811
sentryTest.skip();
912
}
1013

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
window.doSomethingWrong();
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import { expect } from '@playwright/test';
2+
3+
import { sentryTest } from '../../../../utils/fixtures';
4+
import { envelopeRequestParser, waitForErrorRequestOnUrl } from '../../../../utils/helpers';
5+
import { getReplayEvent, shouldSkipReplayTest, waitForReplayRequest } from '../../../../utils/replayHelpers';
6+
7+
sentryTest('should capture a replay & attach an error', async ({ getLocalTestUrl, page }) => {
8+
if (shouldSkipReplayTest()) {
9+
sentryTest.skip();
10+
}
11+
12+
await page.route('https://dsn.ingest.sentry.io/**/*', route => {
13+
return route.fulfill({
14+
status: 200,
15+
contentType: 'application/json',
16+
body: JSON.stringify({ id: 'test-id' }),
17+
});
18+
});
19+
20+
const req = waitForReplayRequest(page);
21+
22+
const url = await getLocalTestUrl({ testDir: __dirname });
23+
const reqError = await waitForErrorRequestOnUrl(page, url);
24+
25+
const errorEventData = envelopeRequestParser(reqError);
26+
expect(errorEventData.exception?.values?.length).toBe(1);
27+
expect(errorEventData.exception?.values?.[0]?.value).toContain('window.doSomethingWrong is not a function');
28+
29+
const eventData = getReplayEvent(await req);
30+
31+
expect(eventData).toBeDefined();
32+
expect(eventData.segment_id).toBe(0);
33+
34+
expect(errorEventData.tags?.replayId).toEqual(eventData.replay_id);
35+
});

dev-packages/browser-integration-tests/loader-suites/loader/onLoad/customReplay/init.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@ Sentry.onLoad(function () {
66
useCompression: false,
77
}),
88
],
9+
10+
replaysSessionSampleRate: 1,
911
});
1012
});
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
Sentry.onLoad(function () {
2-
Sentry.init({});
2+
Sentry.init({
3+
replaysSessionSampleRate: 1,
4+
});
35
});

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"test:loader:eager": "PW_BUNDLE=loader_eager yarn test:loader",
3333
"test:loader:tracing": "PW_BUNDLE=loader_tracing yarn test:loader",
3434
"test:loader:replay": "PW_BUNDLE=loader_replay yarn test:loader",
35+
"test:loader:replay_buffer": "PW_BUNDLE=loader_replay_buffer yarn test:loader",
3536
"test:loader:full": "PW_BUNDLE=loader_tracing_replay yarn test:loader",
3637
"test:loader:debug": "PW_BUNDLE=loader_debug yarn test:loader",
3738
"test:ci": "yarn test:all --reporter='line'",
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
window.doSomethingWrong();
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import { expect } from '@playwright/test';
2+
3+
import { sentryTest } from '../../../../utils/fixtures';
4+
import { envelopeRequestParser, waitForErrorRequestOnUrl } from '../../../../utils/helpers';
5+
import { getReplayEvent, shouldSkipReplayTest, waitForReplayRequest } from '../../../../utils/replayHelpers';
6+
7+
sentryTest(
8+
'[error-mode] should capture error that happens immediately after init',
9+
async ({ getLocalTestUrl, page }) => {
10+
if (shouldSkipReplayTest()) {
11+
sentryTest.skip();
12+
}
13+
14+
await page.route('https://dsn.ingest.sentry.io/**/*', route => {
15+
return route.fulfill({
16+
status: 200,
17+
contentType: 'application/json',
18+
body: JSON.stringify({ id: 'test-id' }),
19+
});
20+
});
21+
22+
const req = waitForReplayRequest(page);
23+
24+
const url = await getLocalTestUrl({ testDir: __dirname });
25+
const reqError = await waitForErrorRequestOnUrl(page, url);
26+
27+
const errorEventData = envelopeRequestParser(reqError);
28+
expect(errorEventData.exception?.values?.length).toBe(1);
29+
expect(errorEventData.exception?.values?.[0]?.value).toContain('window.doSomethingWrong is not a function');
30+
31+
const eventData = getReplayEvent(await req);
32+
33+
expect(eventData).toBeDefined();
34+
expect(eventData.segment_id).toBe(0);
35+
36+
expect(errorEventData.tags?.replayId).toEqual(eventData.replay_id);
37+
},
38+
);
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Add measure before SDK initializes
2+
const end = performance.now();
3+
performance.measure('Next.js-before-hydration', {
4+
duration: 1000,
5+
end,
6+
});
7+
8+
import * as Sentry from '@sentry/browser';
9+
10+
window.Sentry = Sentry;
11+
12+
Sentry.init({
13+
debug: true,
14+
dsn: 'https://[email protected]/1337',
15+
integrations: [
16+
Sentry.browserTracingIntegration({
17+
idleTimeout: 9000,
18+
}),
19+
],
20+
tracesSampleRate: 1,
21+
});
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import { expect } from '@playwright/test';
2+
import type { Event } from '@sentry/types';
3+
4+
import { sentryTest } from '../../../../utils/fixtures';
5+
import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../utils/helpers';
6+
7+
// Validation test for https://github.com/getsentry/sentry-javascript/issues/12281
8+
sentryTest('should add browser-related spans to pageload transaction', async ({ getLocalTestPath, page }) => {
9+
if (shouldSkipTracingTest()) {
10+
sentryTest.skip();
11+
}
12+
13+
const url = await getLocalTestPath({ testDir: __dirname });
14+
15+
const eventData = await getFirstSentryEnvelopeRequest<Event>(page, url);
16+
const browserSpans = eventData.spans?.filter(({ op }) => op === 'browser');
17+
18+
// Spans `domContentLoadedEvent`, `connect`, `cache` and `DNS` are not
19+
// always inside `pageload` transaction.
20+
expect(browserSpans?.length).toBeGreaterThanOrEqual(4);
21+
22+
const requestSpan = browserSpans!.find(({ description }) => description === 'request');
23+
expect(requestSpan).toBeDefined();
24+
25+
const measureSpan = eventData.spans?.find(({ op }) => op === 'measure');
26+
expect(measureSpan).toBeDefined();
27+
28+
expect(requestSpan!.start_timestamp).toBeLessThanOrEqual(measureSpan!.start_timestamp);
29+
expect(measureSpan?.data).toEqual({
30+
'sentry.browser.measure_happened_before_request': true,
31+
'sentry.browser.measure_start_time': expect.any(Number),
32+
'sentry.op': 'measure',
33+
'sentry.origin': 'auto.resource.browser.metrics',
34+
});
35+
});

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"moduleResolution": "node",
77
"noEmit": true,
88
"strict": true,
9-
"allowSyntheticDefaultImports": true
9+
"allowSyntheticDefaultImports": true,
10+
"noUncheckedIndexedAccess": false
1011
},
1112
"include": ["**/*.ts"],
1213
"exclude": ["node_modules"]

0 commit comments

Comments
 (0)