Skip to content

Commit b8162ae

Browse files
authored
Merge branch 'develop' into lforst-nextjs-otel
2 parents e979c75 + 4c0c25c commit b8162ae

File tree

124 files changed

+2199
-671
lines changed

Some content is hidden

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

124 files changed

+2199
-671
lines changed

.github/workflows/build.yml

+3
Original file line numberDiff line numberDiff line change
@@ -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
@@ -1034,6 +1036,7 @@ jobs:
10341036

10351037
- name: Upload test results to Codecov
10361038
if: cancelled() == false
1039+
continue-on-error: true
10371040
uses: codecov/test-results-action@v1
10381041
with:
10391042
directory: dev-packages/e2e-tests

.github/workflows/external-contributors.yml

+2-2
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
@@ -36,7 +36,7 @@ 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:
4141
# This token is scoped to Daniel Griesser
4242
# If we used the default GITHUB_TOKEN, the resulting PR would not trigger CI :(

.size-limit.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ module.exports = [
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)',

CHANGELOG.md

+51-2
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,65 @@
88
99
## Unreleased
1010

11+
- "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott
12+
13+
- **feat(core): Make stream instrumentation opt-in
14+
([#13951](https://github.com/getsentry/sentry-javascript/pull/13951))**
15+
16+
This change adds a new option `trackFetchStreamPerformance` to the browser tracing integration. Only when set to `true`,
17+
Sentry will instrument streams via fetch.
18+
19+
Work in this release was contributed by @ZakrepaShe and @zhiyan114. Thank you for your contributions!
20+
21+
## 8.34.0
22+
1123
### Important Changes
1224

1325
- **ref(nextjs): Remove dead code ([#13828](https://github.com/getsentry/sentry-javascript/pull/13903))**
1426

1527
Relevant for users of the `@sentry/nextjs` package: If you have previously configured a
1628
`SENTRY_IGNORE_API_RESOLUTION_ERROR` environment variable, it is now safe to unset it.
1729

18-
- "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott
30+
### Other Changes
1931

20-
Work in this release was contributed by @trzeciak and @lizhiyao. Thank you for your contributions!
32+
- feat(cdn): Export `getReplay` in replay CDN bundles
33+
([#13881](https://github.com/getsentry/sentry-javascript/pull/13881))
34+
- feat(replay): Clear fallback buffer when switching buffers
35+
([#13914](https://github.com/getsentry/sentry-javascript/pull/13914))
36+
- feat(replay): Upgrade rrweb packages to 2.28.0 ([#13732](https://github.com/getsentry/sentry-javascript/pull/13732))
37+
- fix(docs): Correct supported browsers due to `globalThis`
38+
([#13788](https://github.com/getsentry/sentry-javascript/pull/13788))
39+
- fix(nextjs): Adjust path to `requestAsyncStorageShim.js` template file
40+
([#13928](https://github.com/getsentry/sentry-javascript/pull/13928))
41+
- fix(nextjs): Detect new locations for request async storage to support Next.js v15.0.0-canary.180 and higher
42+
([#13920](https://github.com/getsentry/sentry-javascript/pull/13920))
43+
- fix(nextjs): Drop `_not-found` spans for all HTTP methods
44+
([#13906](https://github.com/getsentry/sentry-javascript/pull/13906))
45+
- fix(nextjs): Fix resolution of request storage shim fallback
46+
([#13929](https://github.com/getsentry/sentry-javascript/pull/13929))
47+
- fix(node): Ensure graphql options are correct when preloading
48+
([#13769](https://github.com/getsentry/sentry-javascript/pull/13769))
49+
- fix(node): Local variables handle error ([#13827](https://github.com/getsentry/sentry-javascript/pull/13827))
50+
- fix(node): Remove `dataloader` instrumentation from default integrations
51+
([#13873](https://github.com/getsentry/sentry-javascript/pull/13873))
52+
- fix(nuxt): Create declaration files for Nuxt module
53+
([#13909](https://github.com/getsentry/sentry-javascript/pull/13909))
54+
- fix(replay): Ensure `replay_id` is removed from frozen DSC when stopped
55+
([#13893](https://github.com/getsentry/sentry-javascript/pull/13893))
56+
- fix(replay): Try/catch `sendBufferedReplayOrFlush` to prevent cycles
57+
([#13900](https://github.com/getsentry/sentry-javascript/pull/13900))
58+
- fix(sveltekit): Ensure trace meta tags are always injected
59+
([#13231](https://github.com/getsentry/sentry-javascript/pull/13231))
60+
- fix(sveltekit): Update `wrapServerRouteWithSentry` to respect ParamMatchers
61+
([#13390](https://github.com/getsentry/sentry-javascript/pull/13390))
62+
- fix(wasm): Integration wasm uncaught WebAssembly.Exception
63+
([#13787](https://github.com/getsentry/sentry-javascript/pull/13787)) (#13854)
64+
- ref(nextjs): Ignore sentry spans based on query param attribute
65+
([#13905](https://github.com/getsentry/sentry-javascript/pull/13905))
66+
- ref(utils): Move `vercelWaitUntil` to utils ([#13891](https://github.com/getsentry/sentry-javascript/pull/13891))
67+
68+
Work in this release was contributed by @trzeciak, @gurpreetatwal, @ykzts and @lizhiyao. Thank you for your
69+
contributions!
2170

2271
## 8.33.1
2372

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/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry-internal/browser-integration-tests",
3-
"version": "8.33.1",
3+
"version": "8.34.0",
44
"main": "index.js",
55
"license": "MIT",
66
"engines": {
@@ -43,7 +43,7 @@
4343
"@babel/preset-typescript": "^7.16.7",
4444
"@playwright/test": "^1.44.1",
4545
"@sentry-internal/rrweb": "2.11.0",
46-
"@sentry/browser": "8.33.1",
46+
"@sentry/browser": "8.34.0",
4747
"axios": "1.6.7",
4848
"babel-loader": "^8.2.2",
4949
"html-webpack-plugin": "^5.5.0",
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+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
const btnStartSpan = document.getElementById('btnStartSpan');
2+
const btnUpdateName = document.getElementById('btnUpdateName');
3+
const btnMakeRequest = document.getElementById('btnMakeRequest');
4+
const btnCaptureError = document.getElementById('btnCaptureError');
5+
const btnEndSpan = document.getElementById('btnEndSpan');
6+
7+
btnStartSpan.addEventListener('click', () => {
8+
Sentry.startSpanManual(
9+
{ name: 'test-root-span', attributes: { [Sentry.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url' } },
10+
async span => {
11+
window.__traceId = span.spanContext().traceId;
12+
await new Promise(resolve => {
13+
btnEndSpan.addEventListener('click', resolve);
14+
});
15+
span.end();
16+
},
17+
);
18+
});
19+
20+
let updateCnt = 0;
21+
btnUpdateName.addEventListener('click', () => {
22+
const span = Sentry.getActiveSpan();
23+
const rootSpan = Sentry.getRootSpan(span);
24+
rootSpan.updateName(`updated-root-span-${++updateCnt}`);
25+
rootSpan.setAttribute(Sentry.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, 'route');
26+
});
27+
28+
btnMakeRequest.addEventListener('click', () => {
29+
fetch('https://example.com/api');
30+
});
31+
32+
btnCaptureError.addEventListener('click', () => {
33+
Sentry.captureException(new Error('test-error'));
34+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<button id="btnStartSpan">Start Span</button>
2+
<button id="btnUpdateName">Update Name</button>
3+
<button id="btnMakeRequest">Make Request</button>
4+
<button id="btnCaptureError">Capture Error</button>
5+
<button id="btnEndSpan">End Span</button>

0 commit comments

Comments
 (0)