Skip to content

Commit 43a6afe

Browse files
authored
Merge pull request #14022 from getsentry/prepare-release/8.35.0
meta(changelog): Update changelog for 8.35.0
2 parents 5a5523e + f4ba039 commit 43a6afe

File tree

128 files changed

+3956
-740
lines changed

Some content is hidden

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

128 files changed

+3956
-740
lines changed

.eslintrc.js

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ module.exports = {
2121
'examples/**',
2222
'test/manual/**',
2323
'types/**',
24+
'scripts/*.js',
2425
],
2526
reportUnusedDisableDirectives: true,
2627
overrides: [

.github/workflows/build.yml

+10
Original file line numberDiff line numberDiff line change
@@ -921,6 +921,7 @@ jobs:
921921
'tanstack-router',
922922
'generic-ts3.8',
923923
'node-fastify',
924+
'node-fastify-5',
924925
'node-hapi',
925926
'node-nestjs-basic',
926927
'node-nestjs-distributed-tracing',
@@ -1034,6 +1035,15 @@ jobs:
10341035
overwrite: true
10351036
retention-days: 7
10361037

1038+
- name: Upload E2E Test Event Dumps
1039+
uses: actions/upload-artifact@v4
1040+
if: always()
1041+
with:
1042+
name: playwright-event-dumps-job_e2e_playwright_tests-${{ matrix.test-application }}
1043+
path: dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}/event-dumps
1044+
overwrite: true
1045+
retention-days: 7
1046+
10371047
- name: Upload test results to Codecov
10381048
if: cancelled() == false
10391049
continue-on-error: true

.github/workflows/external-contributors.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
&& github.event.pull_request.author_association != 'COLLABORATOR'
1919
&& github.event.pull_request.author_association != 'MEMBER'
2020
&& github.event.pull_request.author_association != 'OWNER'
21-
&& endsWith(github.actor, '[bot]') == false
21+
&& endsWith(github.event.pull_request.user.login, '[bot]') == false
2222
steps:
2323
- uses: actions/checkout@v4
2424
- name: Set up Node

.github/workflows/release-comment-issues.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,12 @@ jobs:
2020
run: echo "version=${{ github.event.inputs.version || github.event.release.tag_name }}" >> $GITHUB_OUTPUT
2121

2222
- name: Comment on linked issues that are mentioned in release
23-
if: steps.get_version.outputs.version != ''
23+
if: |
24+
steps.get_version.outputs.version != ''
25+
&& !contains(steps.get_version.outputs.version, '-beta.')
26+
&& !contains(steps.get_version.outputs.version, '-alpha.')
27+
&& !contains(steps.get_version.outputs.version, '-rc.')
28+
2429
uses: getsentry/release-comment-issues-gh-action@v1
2530
with:
2631
github_token: ${{ secrets.GITHUB_TOKEN }}

.size-limit.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,14 @@ module.exports = [
7979
path: 'packages/browser/build/npm/esm/index.js',
8080
import: createImport('init', 'browserTracingIntegration', 'replayIntegration', 'replayCanvasIntegration'),
8181
gzip: true,
82-
limit: '78 KB',
82+
limit: '78.1 KB',
8383
},
8484
{
8585
name: '@sentry/browser (incl. Tracing, Replay, Feedback)',
8686
path: 'packages/browser/build/npm/esm/index.js',
8787
import: createImport('init', 'browserTracingIntegration', 'replayIntegration', 'feedbackIntegration'),
8888
gzip: true,
89-
limit: '91 KB',
89+
limit: '95 KB',
9090
},
9191
{
9292
name: '@sentry/browser (incl. Tracing, Replay, Feedback, metrics)',
@@ -138,7 +138,7 @@ module.exports = [
138138
import: createImport('init', 'ErrorBoundary', 'reactRouterV6BrowserTracingIntegration'),
139139
ignore: ['react/jsx-runtime'],
140140
gzip: true,
141-
limit: '39 KB',
141+
limit: '39.05 KB',
142142
},
143143
// Vue SDK (ESM)
144144
{

CHANGELOG.md

+98
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,104 @@
1010

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

13+
## 8.35.0
14+
15+
### Beta release of the official Nuxt Sentry SDK
16+
17+
This release marks the beta release of the `@sentry/nuxt` Sentry SDK. For details on how to use it, check out the
18+
[Sentry Nuxt SDK README](https://github.com/getsentry/sentry-javascript/tree/develop/packages/nuxt). Please reach out on
19+
[GitHub](https://github.com/getsentry/sentry-javascript/issues/new/choose) if you have any feedback or concerns.
20+
21+
- **feat(nuxt): Make dynamic import() wrapping default
22+
([#13958](https://github.com/getsentry/sentry-javascript/pull/13958))** (BREAKING)
23+
- **feat(nuxt): Add Rollup plugin to wrap server entry with `import()`
24+
([#13945](https://github.com/getsentry/sentry-javascript/pull/13945))**
25+
26+
**It is no longer required to add a Node `--import` flag. Please update your start command to avoid initializing Sentry
27+
twice (BREAKING CHANGE).** The SDK will now apply modifications during the build of your application to allow for
28+
patching of libraries during runtime. If run into issues with this change, you can disable this behavior in your
29+
`nuxt.config.ts` and use the `--import` flag instead:
30+
31+
```js
32+
sentry: {
33+
dynamicImportForServerEntry: false;
34+
}
35+
```
36+
37+
- **feat(nuxt): Respect user-provided source map generation settings
38+
([#14020](https://github.com/getsentry/sentry-javascript/pull/14020))**
39+
40+
We now require you to explicitly enable sourcemaps for the clientside so that Sentry can un-minify your errors. We made
41+
this change so source maps aren't accidentally leaked to the public. Enable source maps on the client as follows:
42+
43+
```js
44+
export default defineNuxtConfig({
45+
sourcemap: {
46+
client: true,
47+
},
48+
});
49+
```
50+
51+
- feat(nuxt): Log server instrumentation might not work in dev
52+
([#14021](https://github.com/getsentry/sentry-javascript/pull/14021))
53+
- feat(nuxt): Add Http `responseHook` with `waitUntil`
54+
([#13986](https://github.com/getsentry/sentry-javascript/pull/13986))
55+
56+
### Important Changes
57+
58+
- **feat(vue): Add Pinia plugin ([#13841](https://github.com/getsentry/sentry-javascript/pull/13841))**
59+
60+
Support for [Pinia](https://pinia.vuejs.org/) is added in this release for `@sentry/vue`. To capture Pinia state data,
61+
add `createSentryPiniaPlugin()` to your Pinia store:
62+
63+
```javascript
64+
import { createPinia } from 'pinia';
65+
import { createSentryPiniaPlugin } from '@sentry/vue';
66+
67+
const pinia = createPinia();
68+
69+
pinia.use(createSentryPiniaPlugin());
70+
```
71+
72+
- **feat(node): Implement Sentry-specific http instrumentation
73+
([#13763](https://github.com/getsentry/sentry-javascript/pull/13763))**
74+
75+
This change introduces a new `SentryHttpInstrumentation` to handle non-span related HTTP instrumentation, allowing it to
76+
run side-by-side with OTel's `HttpInstrumentation`. This improves support for custom OTel setups and avoids conflicts
77+
with Sentry's instrumentation. Additionally, the `spans: false` option is reintroduced for `httpIntegration` to disable
78+
span emission while still allowing custom `HttpInstrumentation` instances (`httpIntegration({ spans: false })`).
79+
80+
- **feat(core): Make stream instrumentation opt-in
81+
([#13951](https://github.com/getsentry/sentry-javascript/pull/13951))**
82+
83+
This change adds a new option `trackFetchStreamPerformance` to the browser tracing integration. Only when set to `true`,
84+
Sentry will instrument streams via fetch.
85+
86+
### Other Changes
87+
88+
- feat(node): Expose `suppressTracing` API ([#13875](https://github.com/getsentry/sentry-javascript/pull/13875))
89+
- feat(replay): Do not log "timeout while trying to read resp body" as exception
90+
([#13965](https://github.com/getsentry/sentry-javascript/pull/13965))
91+
- chore(node): Bump `@opentelemetry/instrumentation-express` to `0.43.0`
92+
([#13948](https://github.com/getsentry/sentry-javascript/pull/13948))
93+
- chore(node): Bump `@opentelemetry/instrumentation-fastify` to `0.40.0`
94+
([#13983](https://github.com/getsentry/sentry-javascript/pull/13983))
95+
- fix: Ensure type for `init` is correct in meta frameworks
96+
([#13938](https://github.com/getsentry/sentry-javascript/pull/13938))
97+
- fix(core): `.set` the `sentry-trace` header instead of `.append`ing in fetch instrumentation
98+
([#13907](https://github.com/getsentry/sentry-javascript/pull/13907))
99+
- fix(module): keep version for node ESM package ([#13922](https://github.com/getsentry/sentry-javascript/pull/13922))
100+
- fix(node): Ensure `ignoreOutgoingRequests` of `httpIntegration` applies to breadcrumbs
101+
([#13970](https://github.com/getsentry/sentry-javascript/pull/13970))
102+
- fix(replay): Fix onError sampling when loading an expired buffered session
103+
([#13962](https://github.com/getsentry/sentry-javascript/pull/13962))
104+
- fix(replay): Ignore older performance entries when starting manually
105+
([#13969](https://github.com/getsentry/sentry-javascript/pull/13969))
106+
- perf(node): Truncate breadcrumb messages created by console integration
107+
([#14006](https://github.com/getsentry/sentry-javascript/pull/14006))
108+
109+
Work in this release was contributed by @ZakrepaShe and @zhiyan114. Thank you for your contributions!
110+
13111
## 8.34.0
14112

15113
### Important Changes

dev-packages/browser-integration-tests/fixtures/loader.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// we define sentryOnLoad in template
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Sentry.captureException('Test exception');
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8" />
5+
<script>
6+
window.sentryOnLoad = function () {
7+
Sentry.init({
8+
tracesSampleRate: 0.123,
9+
});
10+
11+
throw new Error('sentryOnLoad error');
12+
};
13+
</script>
14+
</head>
15+
<body></body>
16+
</html>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import { expect } from '@playwright/test';
2+
3+
import { sentryTest } from '../../../../utils/fixtures';
4+
import { envelopeRequestParser, waitForErrorRequestOnUrl } from '../../../../utils/helpers';
5+
6+
sentryTest(
7+
'sentryOnLoad callback is called before Sentry.onLoad() and handles errors in handler',
8+
async ({ getLocalTestUrl, page }) => {
9+
const errors: string[] = [];
10+
11+
page.on('console', msg => {
12+
if (msg.type() === 'error') {
13+
errors.push(msg.text());
14+
}
15+
});
16+
17+
const url = await getLocalTestUrl({ testDir: __dirname });
18+
const req = await waitForErrorRequestOnUrl(page, url);
19+
20+
const eventData = envelopeRequestParser(req);
21+
22+
expect(eventData.message).toBe('Test exception');
23+
24+
expect(await page.evaluate('Sentry.getClient().getOptions().tracesSampleRate')).toEqual(0.123);
25+
26+
expect(errors).toEqual([
27+
'Error while calling `sentryOnLoad` handler:',
28+
expect.stringContaining('Error: sentryOnLoad error'),
29+
]);
30+
},
31+
);

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

+119
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,125 @@ sentryTest(
287287
},
288288
);
289289

290+
sentryTest(
291+
'[buffer-mode] manually starting replay ignores earlier performance entries',
292+
async ({ getLocalTestUrl, page, browserName }) => {
293+
// This was sometimes flaky on webkit, so skipping for now
294+
if (shouldSkipReplayTest() || browserName === 'webkit') {
295+
sentryTest.skip();
296+
}
297+
298+
const reqPromise0 = waitForReplayRequest(page, 0);
299+
300+
await page.route('https://dsn.ingest.sentry.io/**/*', route => {
301+
return route.fulfill({
302+
status: 200,
303+
contentType: 'application/json',
304+
body: JSON.stringify({ id: 'test-id' }),
305+
});
306+
});
307+
308+
const url = await getLocalTestUrl({ testDir: __dirname });
309+
310+
await page.goto(url);
311+
312+
// Wait for everything to be initialized - Replay is not running yet
313+
await page.waitForFunction('!!window.Replay');
314+
315+
// Wait for a second, then start replay
316+
await new Promise(resolve => setTimeout(resolve, 1000));
317+
await page.evaluate('window.Replay.start()');
318+
319+
const req0 = await reqPromise0;
320+
321+
const event0 = getReplayEvent(req0);
322+
const content0 = getReplayRecordingContent(req0);
323+
324+
expect(event0).toEqual(
325+
getExpectedReplayEvent({
326+
replay_type: 'session',
327+
}),
328+
);
329+
330+
const { performanceSpans } = content0;
331+
332+
// Here, we test that this does not contain any web-vital etc. performance spans
333+
// as these have been emitted _before_ the replay was manually started
334+
expect(performanceSpans).toEqual([
335+
{
336+
op: 'memory',
337+
description: 'memory',
338+
startTimestamp: expect.any(Number),
339+
endTimestamp: expect.any(Number),
340+
data: {
341+
memory: {
342+
jsHeapSizeLimit: expect.any(Number),
343+
totalJSHeapSize: expect.any(Number),
344+
usedJSHeapSize: expect.any(Number),
345+
},
346+
},
347+
},
348+
]);
349+
},
350+
);
351+
352+
sentryTest(
353+
'[buffer-mode] manually starting replay ignores earlier performance entries when starting immediately',
354+
async ({ getLocalTestUrl, page, browserName }) => {
355+
// This was sometimes flaky on webkit, so skipping for now
356+
if (shouldSkipReplayTest() || browserName === 'webkit') {
357+
sentryTest.skip();
358+
}
359+
360+
const reqPromise0 = waitForReplayRequest(page, 0);
361+
362+
await page.route('https://dsn.ingest.sentry.io/**/*', route => {
363+
return route.fulfill({
364+
status: 200,
365+
contentType: 'application/json',
366+
body: JSON.stringify({ id: 'test-id' }),
367+
});
368+
});
369+
370+
const url = await getLocalTestUrl({ testDir: __dirname });
371+
372+
page.goto(url);
373+
374+
// Wait for everything to be initialized, then start replay as soon as possible
375+
await page.waitForFunction('!!window.Replay');
376+
await page.evaluate('window.Replay.start()');
377+
378+
const req0 = await reqPromise0;
379+
380+
const event0 = getReplayEvent(req0);
381+
const content0 = getReplayRecordingContent(req0);
382+
383+
expect(event0).toEqual(
384+
getExpectedReplayEvent({
385+
replay_type: 'session',
386+
}),
387+
);
388+
389+
const { performanceSpans } = content0;
390+
391+
expect(performanceSpans).toEqual([
392+
{
393+
op: 'memory',
394+
description: 'memory',
395+
startTimestamp: expect.any(Number),
396+
endTimestamp: expect.any(Number),
397+
data: {
398+
memory: {
399+
jsHeapSizeLimit: expect.any(Number),
400+
totalJSHeapSize: expect.any(Number),
401+
usedJSHeapSize: expect.any(Number),
402+
},
403+
},
404+
},
405+
]);
406+
},
407+
);
408+
290409
// Doing this in buffer mode to test changing error sample rate after first
291410
// error happens.
292411
sentryTest(
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import * as Sentry from '@sentry/browser';
2+
3+
window.Sentry = Sentry;
4+
5+
Sentry.init({
6+
dsn: 'https://[email protected]/1337',
7+
integrations: [Sentry.browserTracingIntegration({ instrumentNavigation: false, instrumentPageLoad: false })],
8+
tracesSampleRate: 1,
9+
tracePropagationTargets: ['example.com'],
10+
release: '1.1.1',
11+
});

0 commit comments

Comments
 (0)