Skip to content

Commit 9c88dcb

Browse files
committed
Merge branch 'develop' into beta
2 parents e35fcfc + b271bc8 commit 9c88dcb

File tree

134 files changed

+2116
-907
lines changed

Some content is hidden

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

134 files changed

+2116
-907
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,8 @@ jobs:
795795
# - The build job was successful, not skipped
796796
# - AND if the profiling node bindings were either successful or skipped
797797
if: |
798-
always() && needs.job_build.result == 'success' &&
798+
always() &&
799+
needs.job_build.result == 'success' &&
799800
(needs.job_compile_bindings_profiling_node.result == 'success' || needs.job_compile_bindings_profiling_node.result == 'skipped')
800801
needs: [job_get_metadata, job_build, job_compile_bindings_profiling_node]
801802
runs-on: ubuntu-20.04-large-js
@@ -981,13 +982,16 @@ jobs:
981982
directory: dev-packages/e2e-tests
982983
token: ${{ secrets.CODECOV_TOKEN }}
983984

985+
# - We skip optional tests on release branches
984986
job_optional_e2e_tests:
985987
name: E2E ${{ matrix.label || matrix.test-application }} Test
986988
# 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
987989
# We need to add the `always()` check here because the previous step has this as well :(
988990
# See: https://github.com/actions/runner/issues/2205
989991
if:
990-
always() && needs.job_e2e_prepare.result == 'success' &&
992+
always() &&
993+
needs.job_get_metadata.outputs.is_release != 'true' &&
994+
needs.job_e2e_prepare.result == 'success' &&
991995
needs.job_e2e_prepare.outputs.matrix-optional != '{"include":[]}' &&
992996
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) &&
993997
github.actor != 'dependabot[bot]'

.github/workflows/canary.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ env:
1414

1515
CACHED_BUILD_PATHS: |
1616
${{ github.workspace }}/packages/*/*.tgz
17-
${{ github.workspace }}/dev-packages/test-utils/build
1817
${{ github.workspace }}/node_modules
1918
${{ github.workspace }}/packages/*/node_modules
2019
${{ github.workspace }}/dev-packages/*/node_modules
21-
${{ github.workspace }}/packages/utils/build
20+
${{ github.workspace }}/dev-packages/*/build
21+
${{ github.workspace }}/packages/*/build
2222
2323
permissions:
2424
contents: read

.size-limit.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ module.exports = [
4040
path: 'packages/browser/build/npm/esm/index.js',
4141
import: createImport('init', 'browserTracingIntegration'),
4242
gzip: true,
43-
limit: '36.5 KB',
43+
limit: '37.5 KB',
4444
},
4545
{
4646
name: '@sentry/browser (incl. Tracing, Replay)',
@@ -124,7 +124,7 @@ module.exports = [
124124
import: createImport('init', 'ErrorBoundary', 'reactRouterV6BrowserTracingIntegration'),
125125
ignore: ['react/jsx-runtime'],
126126
gzip: true,
127-
limit: '39.5 KB',
127+
limit: '40.5 KB',
128128
},
129129
// Vue SDK (ESM)
130130
{
@@ -139,7 +139,7 @@ module.exports = [
139139
path: 'packages/vue/build/esm/index.js',
140140
import: createImport('init', 'browserTracingIntegration'),
141141
gzip: true,
142-
limit: '38.5 KB',
142+
limit: '39.5 KB',
143143
},
144144
// Svelte SDK (ESM)
145145
{
@@ -187,7 +187,7 @@ module.exports = [
187187
path: createCDNPath('bundle.tracing.min.js'),
188188
gzip: false,
189189
brotli: false,
190-
limit: '113 KB',
190+
limit: '120 KB',
191191
},
192192
{
193193
name: 'CDN Bundle (incl. Tracing, Replay) - uncompressed',
@@ -219,7 +219,7 @@ module.exports = [
219219
import: createImport('init'),
220220
ignore: ['$app/stores'],
221221
gzip: true,
222-
limit: '37 KB',
222+
limit: '38 KB',
223223
},
224224
// Node SDK (ESM)
225225
{

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@
1010

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

13-
## 8.41.0-beta.0
14-
15-
- feat: Add LaunchDarkly and OpenFeature integrations for beta testing
13+
Work in this release was contributed by @NEKOYASAN. Thank you for your contribution!
1614

1715
## 8.40.0
1816

@@ -85,10 +83,12 @@
8583
### Other Changes
8684

8785
- feat(browser): Send additional LCP timing info ([#14372](https://github.com/getsentry/sentry-javascript/pull/14372))
86+
- feat(replay): Clear event buffer when full and in buffer mode ([#14078](https://github.com/getsentry/sentry-javascript/pull/14078))
8887
- feat(core): Ensure `normalizedRequest` on `sdkProcessingMetadata` is merged ([#14315](https://github.com/getsentry/sentry-javascript/pull/14315))
8988
- feat(core): Hoist everything from `@sentry/utils` into `@sentry/core` ([#14382](https://github.com/getsentry/sentry-javascript/pull/14382))
9089
- fix(core): Do not throw when trying to fill readonly properties ([#14402](https://github.com/getsentry/sentry-javascript/pull/14402))
9190
- fix(feedback): Fix `__self` and `__source` attributes on feedback nodes ([#14356](https://github.com/getsentry/sentry-javascript/pull/14356))
91+
- fix(feedback): Fix non-wrapping form title ([#14355](https://github.com/getsentry/sentry-javascript/pull/14355))
9292
- fix(nextjs): Update check for not found navigation error ([#14378](https://github.com/getsentry/sentry-javascript/pull/14378))
9393

9494
## 8.39.0

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry-internal/browser-integration-tests",
3-
"version": "8.41.0-beta.0",
3+
"version": "8.40.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.29.0",
46-
"@sentry/browser": "8.41.0-beta.0",
46+
"@sentry/browser": "8.40.0",
4747
"axios": "1.7.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,4 @@
1+
Sentry.withScope(() => {
2+
Sentry.startSpan({ name: 'test_span_1' }, () => undefined);
3+
Sentry.startSpan({ name: 'test_span_2' }, () => undefined);
4+
});
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import { expect } from '@playwright/test';
2+
3+
import type { TransactionEvent } from '@sentry/types';
4+
import { sentryTest } from '../../../../utils/fixtures';
5+
import { envelopeRequestParser, shouldSkipTracingTest, waitForTransactionRequest } from '../../../../utils/helpers';
6+
7+
sentryTest(
8+
'should send manually started parallel root spans outside of root context',
9+
async ({ getLocalTestUrl, page }) => {
10+
if (shouldSkipTracingTest()) {
11+
sentryTest.skip();
12+
}
13+
14+
const url = await getLocalTestUrl({ testDir: __dirname });
15+
16+
const transaction1ReqPromise = waitForTransactionRequest(page, event => event.transaction === 'test_span_1');
17+
const transaction2ReqPromise = waitForTransactionRequest(page, event => event.transaction === 'test_span_2');
18+
19+
await page.goto(url);
20+
21+
const [transaction1Req, transaction2Req] = await Promise.all([transaction1ReqPromise, transaction2ReqPromise]);
22+
23+
const transaction1 = envelopeRequestParser<TransactionEvent>(transaction1Req);
24+
const transaction2 = envelopeRequestParser<TransactionEvent>(transaction2Req);
25+
26+
expect(transaction1).toBeDefined();
27+
expect(transaction2).toBeDefined();
28+
29+
const trace1Id = transaction1.contexts?.trace?.trace_id;
30+
const trace2Id = transaction2.contexts?.trace?.trace_id;
31+
32+
expect(trace1Id).toBeDefined();
33+
expect(trace2Id).toBeDefined();
34+
35+
// We use the same traceID from the root propagation context here
36+
expect(trace1Id).toBe(trace2Id);
37+
38+
expect(transaction1.contexts?.trace?.parent_span_id).toBeUndefined();
39+
expect(transaction2.contexts?.trace?.parent_span_id).toBeUndefined();
40+
},
41+
);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Sentry.getCurrentScope().setPropagationContext({
2+
parentSpanId: '1234567890123456',
3+
spanId: '123456789012345x',
4+
traceId: '12345678901234567890123456789012',
5+
});
6+
7+
Sentry.startSpan({ name: 'test_span_1' }, () => undefined);
8+
Sentry.startSpan({ name: 'test_span_2' }, () => undefined);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import { expect } from '@playwright/test';
2+
3+
import type { TransactionEvent } from '@sentry/types';
4+
import { sentryTest } from '../../../../utils/fixtures';
5+
import { envelopeRequestParser, shouldSkipTracingTest, waitForTransactionRequest } from '../../../../utils/helpers';
6+
7+
sentryTest(
8+
'should send manually started parallel root spans in root context with parentSpanId',
9+
async ({ getLocalTestUrl, page }) => {
10+
if (shouldSkipTracingTest()) {
11+
sentryTest.skip();
12+
}
13+
14+
const url = await getLocalTestUrl({ testDir: __dirname });
15+
16+
const transaction1ReqPromise = waitForTransactionRequest(page, event => event.transaction === 'test_span_1');
17+
const transaction2ReqPromise = waitForTransactionRequest(page, event => event.transaction === 'test_span_2');
18+
19+
await page.goto(url);
20+
21+
const [transaction1Req, transaction2Req] = await Promise.all([transaction1ReqPromise, transaction2ReqPromise]);
22+
23+
const transaction1 = envelopeRequestParser<TransactionEvent>(transaction1Req);
24+
const transaction2 = envelopeRequestParser<TransactionEvent>(transaction2Req);
25+
26+
expect(transaction1).toBeDefined();
27+
expect(transaction2).toBeDefined();
28+
29+
const trace1Id = transaction1.contexts?.trace?.trace_id;
30+
const trace2Id = transaction2.contexts?.trace?.trace_id;
31+
32+
expect(trace1Id).toBe('12345678901234567890123456789012');
33+
expect(trace2Id).toBe('12345678901234567890123456789012');
34+
35+
expect(transaction1.contexts?.trace?.parent_span_id).toBe('1234567890123456');
36+
expect(transaction2.contexts?.trace?.parent_span_id).toBe('1234567890123456');
37+
},
38+
);
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Sentry.startSpan({ name: 'test_span_1' }, () => undefined);
2+
Sentry.startSpan({ name: 'test_span_2' }, () => undefined);
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 type { TransactionEvent } from '@sentry/types';
4+
import { sentryTest } from '../../../../utils/fixtures';
5+
import { envelopeRequestParser, shouldSkipTracingTest, waitForTransactionRequest } from '../../../../utils/helpers';
6+
7+
sentryTest('should send manually started parallel root spans in root context', async ({ getLocalTestUrl, page }) => {
8+
if (shouldSkipTracingTest()) {
9+
sentryTest.skip();
10+
}
11+
12+
const url = await getLocalTestUrl({ testDir: __dirname });
13+
14+
const transaction1ReqPromise = waitForTransactionRequest(page, event => event.transaction === 'test_span_1');
15+
const transaction2ReqPromise = waitForTransactionRequest(page, event => event.transaction === 'test_span_2');
16+
17+
await page.goto(url);
18+
19+
const [transaction1Req, transaction2Req] = await Promise.all([transaction1ReqPromise, transaction2ReqPromise]);
20+
21+
const transaction1 = envelopeRequestParser<TransactionEvent>(transaction1Req);
22+
const transaction2 = envelopeRequestParser<TransactionEvent>(transaction2Req);
23+
24+
expect(transaction1).toBeDefined();
25+
expect(transaction2).toBeDefined();
26+
27+
const trace1Id = transaction1.contexts?.trace?.trace_id;
28+
const trace2Id = transaction2.contexts?.trace?.trace_id;
29+
30+
expect(trace1Id).toBeDefined();
31+
expect(trace2Id).toBeDefined();
32+
33+
// We use the same traceID from the root propagation context here
34+
expect(trace1Id).toBe(trace2Id);
35+
36+
expect(transaction1.contexts?.trace?.parent_span_id).toBeUndefined();
37+
expect(transaction2.contexts?.trace?.parent_span_id).toBeUndefined();
38+
});

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

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import type {
77
Event,
88
EventEnvelope,
99
EventEnvelopeHeaders,
10+
TransactionEvent,
1011
} from '@sentry/types';
1112

1213
export const envelopeUrlRegex = /\.sentry\.io\/api\/\d+\/envelope\//;
@@ -224,7 +225,10 @@ export function waitForErrorRequest(page: Page, callback?: (event: Event) => boo
224225
});
225226
}
226227

227-
export function waitForTransactionRequest(page: Page): Promise<Request> {
228+
export function waitForTransactionRequest(
229+
page: Page,
230+
callback?: (event: TransactionEvent) => boolean,
231+
): Promise<Request> {
228232
return page.waitForRequest(req => {
229233
const postData = req.postData();
230234
if (!postData) {
@@ -234,7 +238,15 @@ export function waitForTransactionRequest(page: Page): Promise<Request> {
234238
try {
235239
const event = envelopeRequestParser(req);
236240

237-
return event.type === 'transaction';
241+
if (event.type !== 'transaction') {
242+
return false;
243+
}
244+
245+
if (callback) {
246+
return callback(event as TransactionEvent);
247+
}
248+
249+
return true;
238250
} catch {
239251
return false;
240252
}

dev-packages/bundle-analyzer-scenarios/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry-internal/bundle-analyzer-scenarios",
3-
"version": "8.41.0-beta.0",
3+
"version": "8.40.0",
44
"description": "Scenarios to test bundle analysis with",
55
"repository": "git://github.com/getsentry/sentry-javascript.git",
66
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/dev-packages/bundle-analyzer-scenarios",

dev-packages/clear-cache-gh-action/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@sentry-internal/clear-cache-gh-action",
33
"description": "An internal Github Action to clear GitHub caches.",
4-
"version": "8.41.0-beta.0",
4+
"version": "8.40.0",
55
"license": "MIT",
66
"engines": {
77
"node": ">=18"

dev-packages/e2e-tests/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry-internal/e2e-tests",
3-
"version": "8.41.0-beta.0",
3+
"version": "8.40.0",
44
"license": "MIT",
55
"private": true,
66
"scripts": {
@@ -16,7 +16,7 @@
1616
"clean": "rimraf tmp node_modules pnpm-lock.yaml && yarn clean:test-applications",
1717
"ci:build-matrix": "ts-node ./lib/getTestMatrix.ts",
1818
"ci:build-matrix-optional": "ts-node ./lib/getTestMatrix.ts --optional=true",
19-
"clean:test-applications": "rimraf --glob test-applications/**/{node_modules,dist,build,.next,.sveltekit,pnpm-lock.yaml} .last-run.json && pnpm store prune"
19+
"clean:test-applications": "rimraf --glob test-applications/**/{node_modules,dist,build,.next,.sveltekit,pnpm-lock.yaml,.last-run.json,test-results} && pnpm store prune"
2020
},
2121
"devDependencies": {
2222
"@types/glob": "8.0.0",
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export default function RedirectDestinationPage() {
2+
return (
3+
<div>
4+
<h1>Redirect Destination</h1>
5+
</div>
6+
);
7+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { redirect } from 'next/navigation';
2+
3+
async function redirectAction() {
4+
'use server';
5+
6+
redirect('/redirect/destination');
7+
}
8+
9+
export default function RedirectOriginPage() {
10+
return (
11+
<>
12+
{/* @ts-ignore */}
13+
<form action={redirectAction}>
14+
<button type="submit">Redirect me</button>
15+
</form>
16+
</>
17+
);
18+
}

0 commit comments

Comments
 (0)