Skip to content

Commit 2a1dd9a

Browse files
authored
Merge pull request #13941 from getsentry/prepare-release/8.34.0
meta(changelog): Update changelog for 8.34.0
2 parents 3d3e7ac + 20914b0 commit 2a1dd9a

File tree

107 files changed

+2786
-1439
lines changed

Some content is hidden

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

107 files changed

+2786
-1439
lines changed

.github/workflows/build.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ jobs:
152152
id: install_dependencies
153153

154154
- name: Check for Affected Nx Projects
155-
uses: dkhunt27/action-nx-affected-list@v5.3
155+
uses: dkhunt27/action-nx-affected-list@v6.1
156156
id: checkForAffected
157157
if: github.event_name == 'pull_request'
158158
with:
@@ -611,6 +611,7 @@ jobs:
611611

612612
- name: Upload test results to Codecov
613613
if: cancelled() == false
614+
continue-on-error: true
614615
uses: codecov/test-results-action@v1
615616
with:
616617
directory: dev-packages/browser-integration-tests
@@ -671,6 +672,7 @@ jobs:
671672

672673
- name: Upload test results to Codecov
673674
if: cancelled() == false
675+
continue-on-error: true
674676
uses: codecov/test-results-action@v1
675677
with:
676678
directory: dev-packages/browser-integration-tests
@@ -915,6 +917,7 @@ jobs:
915917
'sveltekit',
916918
'sveltekit-2',
917919
'sveltekit-2-svelte-5',
920+
'sveltekit-2-twp',
918921
'tanstack-router',
919922
'generic-ts3.8',
920923
'node-fastify',
@@ -931,6 +934,7 @@ jobs:
931934
'node-koa',
932935
'node-connect',
933936
'nuxt-3',
937+
'nuxt-4',
934938
'vue-3',
935939
'webpack-4',
936940
'webpack-5'
@@ -1032,6 +1036,7 @@ jobs:
10321036

10331037
- name: Upload test results to Codecov
10341038
if: cancelled() == false
1039+
continue-on-error: true
10351040
uses: codecov/test-results-action@v1
10361041
with:
10371042
directory: dev-packages/e2e-tests

.github/workflows/external-contributors.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,11 @@ jobs:
3636
author_association: ${{ github.event.pull_request.author_association }}
3737

3838
- name: Create PR with changes
39-
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c
39+
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f
4040
with:
41+
# This token is scoped to Daniel Griesser
42+
# If we used the default GITHUB_TOKEN, the resulting PR would not trigger CI :(
43+
token: ${{ secrets.REPO_SCOPED_TOKEN }}
4144
commit-message: "ref: Add external contributor to CHANGELOG.md"
4245
title: "ref: Add external contributor to CHANGELOG.md"
4346
branch: 'external-contributor/patch-${{ github.event.pull_request.user.login }}'

.size-limit.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ module.exports = [
180180
name: 'CDN Bundle (incl. Tracing, Replay)',
181181
path: createCDNPath('bundle.tracing.replay.min.js'),
182182
gzip: true,
183-
limit: '73 KB',
183+
limit: '74 KB',
184184
},
185185
{
186186
name: 'CDN Bundle (incl. Tracing, Replay, Feedback)',

CHANGELOG.md

+55-5
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,56 @@
1010

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

13+
## 8.34.0
14+
15+
### Important Changes
16+
17+
- **ref(nextjs): Remove dead code ([#13828](https://github.com/getsentry/sentry-javascript/pull/13903))**
18+
19+
Relevant for users of the `@sentry/nextjs` package: If you have previously configured a
20+
`SENTRY_IGNORE_API_RESOLUTION_ERROR` environment variable, it is now safe to unset it.
21+
22+
### Other Changes
23+
24+
- feat(cdn): Export `getReplay` in replay CDN bundles
25+
([#13881](https://github.com/getsentry/sentry-javascript/pull/13881))
26+
- feat(replay): Clear fallback buffer when switching buffers
27+
([#13914](https://github.com/getsentry/sentry-javascript/pull/13914))
28+
- feat(replay): Upgrade rrweb packages to 2.28.0 ([#13732](https://github.com/getsentry/sentry-javascript/pull/13732))
29+
- fix(docs): Correct supported browsers due to `globalThis`
30+
([#13788](https://github.com/getsentry/sentry-javascript/pull/13788))
31+
- fix(nextjs): Adjust path to `requestAsyncStorageShim.js` template file
32+
([#13928](https://github.com/getsentry/sentry-javascript/pull/13928))
33+
- fix(nextjs): Detect new locations for request async storage to support Next.js v15.0.0-canary.180 and higher
34+
([#13920](https://github.com/getsentry/sentry-javascript/pull/13920))
35+
- fix(nextjs): Drop `_not-found` spans for all HTTP methods
36+
([#13906](https://github.com/getsentry/sentry-javascript/pull/13906))
37+
- fix(nextjs): Fix resolution of request storage shim fallback
38+
([#13929](https://github.com/getsentry/sentry-javascript/pull/13929))
39+
- fix(node): Ensure graphql options are correct when preloading
40+
([#13769](https://github.com/getsentry/sentry-javascript/pull/13769))
41+
- fix(node): Local variables handle error ([#13827](https://github.com/getsentry/sentry-javascript/pull/13827))
42+
- fix(node): Remove `dataloader` instrumentation from default integrations
43+
([#13873](https://github.com/getsentry/sentry-javascript/pull/13873))
44+
- fix(nuxt): Create declaration files for Nuxt module
45+
([#13909](https://github.com/getsentry/sentry-javascript/pull/13909))
46+
- fix(replay): Ensure `replay_id` is removed from frozen DSC when stopped
47+
([#13893](https://github.com/getsentry/sentry-javascript/pull/13893))
48+
- fix(replay): Try/catch `sendBufferedReplayOrFlush` to prevent cycles
49+
([#13900](https://github.com/getsentry/sentry-javascript/pull/13900))
50+
- fix(sveltekit): Ensure trace meta tags are always injected
51+
([#13231](https://github.com/getsentry/sentry-javascript/pull/13231))
52+
- fix(sveltekit): Update `wrapServerRouteWithSentry` to respect ParamMatchers
53+
([#13390](https://github.com/getsentry/sentry-javascript/pull/13390))
54+
- fix(wasm): Integration wasm uncaught WebAssembly.Exception
55+
([#13787](https://github.com/getsentry/sentry-javascript/pull/13787)) (#13854)
56+
- ref(nextjs): Ignore sentry spans based on query param attribute
57+
([#13905](https://github.com/getsentry/sentry-javascript/pull/13905))
58+
- ref(utils): Move `vercelWaitUntil` to utils ([#13891](https://github.com/getsentry/sentry-javascript/pull/13891))
59+
60+
Work in this release was contributed by @trzeciak, @gurpreetatwal, @ykzts and @lizhiyao. Thank you for your
61+
contributions!
62+
1363
## 8.33.1
1464

1565
- fix(core): Update trpc middleware types ([#13859](https://github.com/getsentry/sentry-javascript/pull/13859))
@@ -1158,12 +1208,12 @@ with full support for ESM-based node apps using **Node.js 18.19.0 or higher**.
11581208
[**ES2018+**](https://caniuse.com/?feats=mdn-javascript_builtins_regexp_dotall,js-regexp-lookbehind,mdn-javascript_builtins_regexp_named_capture_groups,mdn-javascript_builtins_regexp_property_escapes,mdn-javascript_builtins_symbol_asynciterator,mdn-javascript_functions_method_definitions_async_generator_methods,mdn-javascript_grammar_template_literals_template_literal_revision,mdn-javascript_operators_destructuring_rest_in_objects,mdn-javascript_operators_destructuring_rest_in_arrays,promise-finally)
11591209
compatible browsers. New minimum browser versions:
11601210

1161-
- Chrome 63
1211+
- Chrome 71
11621212
- Edge 79
1163-
- Safari/iOS Safari 12
1164-
- Firefox 58
1165-
- Opera 50
1166-
- Samsung Internet 8.2
1213+
- Safari 12.1, iOS Safari 12.2
1214+
- Firefox 65
1215+
- Opera 58
1216+
- Samsung Internet 10
11671217

11681218
For more details, please see the
11691219
[version support section in our migration guide](./MIGRATION.md#1-version-support-changes).

MIGRATION.md

+10-8
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,20 @@ higher. Lower versions may continue to work, but may not support all features (e
2424
applies to `@sentry/node` and all of our node-based server-side sdks (`@sentry/nextjs`, `@sentry/serverless`, etc.). We
2525
no 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 ES2018+ compatible
28-
browsers. This means that we no longer support IE11 (end of an era). This also means that the Browser SDK requires the
29-
fetch API to be available in the environment.
27+
**Browser**: Our browser SDKs (`@sentry/browser`, `@sentry/react`, `@sentry/vue`, etc.) now require ES2018+
28+
compatibility plus support for
29+
[`globalThis`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis). This means
30+
that we no longer support IE11 (end of an era). This also means that the Browser SDK requires the fetch API to be
31+
available in the environment.
3032

3133
New minimum supported browsers:
3234

33-
- Chrome 63
35+
- Chrome 71
3436
- Edge 79
35-
- Safari/iOS Safari 12
36-
- Firefox 58
37-
- Opera 50
38-
- Samsung Internet 8.2
37+
- Safari 12.1, iOS Safari 12.2
38+
- Firefox 65
39+
- Opera 58
40+
- Samsung Internet 10
3941

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

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ package. Please refer to the README and instructions of those SDKs for more deta
6262
- [`@sentry/remix`](https://github.com/getsentry/sentry-javascript/tree/master/packages/remix): SDK for Remix
6363
- [`@sentry/aws-serverless`](https://github.com/getsentry/sentry-javascript/tree/master/packages/aws-serverless): SDK
6464
for AWS Lambda Functions
65-
- [`@sentry/google-cloud-serverless`](https://github.com/getsentry/sentry-javascript/tree/master/packages/google-cloud):
65+
- [`@sentry/google-cloud-serverless`](https://github.com/getsentry/sentry-javascript/tree/master/packages/google-cloud-serverless):
6666
SDK for Google Cloud Functions
6767
- [`@sentry/electron`](https://github.com/getsentry/sentry-electron): SDK for Electron with support for native crashes
6868
- [`@sentry/react-native`](https://github.com/getsentry/sentry-react-native): SDK for React Native with support for
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import * as Sentry from '@sentry/browser';
2+
3+
window._triggerError = function (errorCount) {
4+
Sentry.captureException(new Error(`This is error #${errorCount}`));
5+
};

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

+80-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@ import type * as Sentry from '@sentry/browser';
33
import type { EventEnvelopeHeaders } from '@sentry/types';
44

55
import { sentryTest } from '../../../utils/fixtures';
6-
import { envelopeRequestParser, shouldSkipTracingTest, waitForTransactionRequest } from '../../../utils/helpers';
6+
import {
7+
envelopeRequestParser,
8+
shouldSkipTracingTest,
9+
waitForErrorRequest,
10+
waitForTransactionRequest,
11+
} from '../../../utils/helpers';
712
import { getReplaySnapshot, shouldSkipReplayTest, waitForReplayRunning } from '../../../utils/replayHelpers';
813

914
type TestWindow = Window & {
@@ -216,3 +221,77 @@ sentryTest(
216221
});
217222
},
218223
);
224+
225+
sentryTest('should add replay_id to error DSC while replay is active', async ({ getLocalTestPath, page }) => {
226+
if (shouldSkipReplayTest()) {
227+
sentryTest.skip();
228+
}
229+
230+
const hasTracing = !shouldSkipTracingTest();
231+
232+
await page.route('https://dsn.ingest.sentry.io/**/*', route => {
233+
return route.fulfill({
234+
status: 200,
235+
contentType: 'application/json',
236+
body: JSON.stringify({ id: 'test-id' }),
237+
});
238+
});
239+
240+
const url = await getLocalTestPath({ testDir: __dirname });
241+
await page.goto(url);
242+
243+
const error1Req = waitForErrorRequest(page, event => event.exception?.values?.[0].value === 'This is error #1');
244+
const error2Req = waitForErrorRequest(page, event => event.exception?.values?.[0].value === 'This is error #2');
245+
246+
// We want to wait for the transaction to be done, to ensure we have a consistent test
247+
const transactionReq = hasTracing ? waitForTransactionRequest(page) : Promise.resolve();
248+
249+
// Wait for this to be available
250+
await page.waitForFunction('!!window.Replay');
251+
252+
// We have to start replay before we finish the transaction, otherwise the DSC will not be frozen with the Replay ID
253+
await page.evaluate('window.Replay.start();');
254+
await waitForReplayRunning(page);
255+
await transactionReq;
256+
257+
await page.evaluate('window._triggerError(1)');
258+
259+
const error1Header = envelopeRequestParser(await error1Req, 0) as EventEnvelopeHeaders;
260+
const replay = await getReplaySnapshot(page);
261+
262+
expect(replay.session?.id).toBeDefined();
263+
264+
expect(error1Header.trace).toBeDefined();
265+
expect(error1Header.trace).toEqual({
266+
environment: 'production',
267+
trace_id: expect.any(String),
268+
public_key: 'public',
269+
replay_id: replay.session?.id,
270+
...(hasTracing
271+
? {
272+
sample_rate: '1',
273+
sampled: 'true',
274+
}
275+
: {}),
276+
});
277+
278+
// Now end replay and trigger another error, it should not have a replay_id in DSC anymore
279+
await page.evaluate('window.Replay.stop();');
280+
await page.waitForFunction('!window.Replay.getReplayId();');
281+
await page.evaluate('window._triggerError(2)');
282+
283+
const error2Header = envelopeRequestParser(await error2Req, 0) as EventEnvelopeHeaders;
284+
285+
expect(error2Header.trace).toBeDefined();
286+
expect(error2Header.trace).toEqual({
287+
environment: 'production',
288+
trace_id: expect.any(String),
289+
public_key: 'public',
290+
...(hasTracing
291+
? {
292+
sample_rate: '1',
293+
sampled: 'true',
294+
}
295+
: {}),
296+
});
297+
});

dev-packages/browser-integration-tests/suites/tracing/trace-lifetime/tracing-without-performance/test.ts

+32
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,38 @@ const META_TAG_PARENT_SPAN_ID = '1234567890123456';
1212
const META_TAG_BAGGAGE =
1313
'sentry-trace_id=12345678901234567890123456789012,sentry-public_key=public,sentry-release=1.0.0,sentry-environment=prod';
1414

15+
sentryTest('error on initial page has traceId from meta tag', async ({ getLocalTestUrl, page }) => {
16+
if (shouldSkipTracingTest()) {
17+
sentryTest.skip();
18+
}
19+
20+
const url = await getLocalTestUrl({ testDir: __dirname });
21+
await page.goto(url);
22+
23+
const errorEventPromise = getFirstSentryEnvelopeRequest<EventAndTraceHeader>(
24+
page,
25+
undefined,
26+
eventAndTraceHeaderRequestParser,
27+
);
28+
29+
await page.locator('#errorBtn').click();
30+
const [errorEvent, errorTraceHeader] = await errorEventPromise;
31+
32+
expect(errorEvent.type).toEqual(undefined);
33+
expect(errorEvent.contexts?.trace).toEqual({
34+
trace_id: META_TAG_TRACE_ID,
35+
parent_span_id: META_TAG_PARENT_SPAN_ID,
36+
span_id: expect.stringMatching(/^[0-9a-f]{16}$/),
37+
});
38+
39+
expect(errorTraceHeader).toEqual({
40+
environment: 'prod',
41+
public_key: 'public',
42+
release: '1.0.0',
43+
trace_id: META_TAG_TRACE_ID,
44+
});
45+
});
46+
1547
sentryTest('error has new traceId after navigation', async ({ getLocalTestUrl, page }) => {
1648
if (shouldSkipTracingTest()) {
1749
sentryTest.skip();

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

+10-2
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ export async function waitForTransactionRequestOnUrl(page: Page, url: string): P
199199
return req;
200200
}
201201

202-
export function waitForErrorRequest(page: Page): Promise<Request> {
202+
export function waitForErrorRequest(page: Page, callback?: (event: Event) => boolean): Promise<Request> {
203203
return page.waitForRequest(req => {
204204
const postData = req.postData();
205205
if (!postData) {
@@ -209,7 +209,15 @@ export function waitForErrorRequest(page: Page): Promise<Request> {
209209
try {
210210
const event = envelopeRequestParser(req);
211211

212-
return !event.type;
212+
if (event.type) {
213+
return false;
214+
}
215+
216+
if (callback) {
217+
return callback(event);
218+
}
219+
220+
return true;
213221
} catch {
214222
return false;
215223
}

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"@types/node": "18.11.17",
1818
"@types/react": "18.0.26",
1919
"@types/react-dom": "18.0.9",
20-
"next": "15.0.0-canary.112",
20+
"next": "15.0.0-canary.182",
2121
"react": "beta",
2222
"react-dom": "beta",
2323
"typescript": "4.9.5"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Nuxt dev/build outputs
2+
.output
3+
.data
4+
.nuxt
5+
.nitro
6+
.cache
7+
dist
8+
9+
# Node dependencies
10+
node_modules
11+
12+
# Logs
13+
logs
14+
*.log
15+
16+
# Misc
17+
.DS_Store
18+
.fleet
19+
.idea
20+
21+
# Local env files
22+
.env
23+
.env.*
24+
!.env.example
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@sentry:registry=http://127.0.0.1:4873
2+
@sentry-internal:registry=http://127.0.0.1:4873

0 commit comments

Comments
 (0)