Skip to content

Commit 3bb5ac8

Browse files
authored
Merge pull request #16563 from getsentry/prepare-release/9.29.0
meta(changelog): Update changelog for 9.29.0
2 parents 0ce6dc5 + 6882abf commit 3bb5ac8

File tree

57 files changed

+925
-336
lines changed

Some content is hidden

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

57 files changed

+925
-336
lines changed

.size-limit.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ module.exports = [
120120
import: createImport('init', 'ErrorBoundary', 'reactRouterV6BrowserTracingIntegration'),
121121
ignore: ['react/jsx-runtime'],
122122
gzip: true,
123-
limit: '40.5 KB',
123+
limit: '41 KB',
124124
},
125125
// Vue SDK (ESM)
126126
{
@@ -215,7 +215,7 @@ module.exports = [
215215
import: createImport('init'),
216216
ignore: ['$app/stores'],
217217
gzip: true,
218-
limit: '39 KB',
218+
limit: '40 KB',
219219
},
220220
// Node SDK (ESM)
221221
{

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,23 @@
44

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

7+
## 9.29.0
8+
9+
### Important Changes
10+
11+
- **feat(browser): Update `web-vitals` to 5.0.2 ([#16492](https://github.com/getsentry/sentry-javascript/pull/16492))**
12+
13+
This release upgrades the `web-vitals` library to version 5.0.2. This upgrade could slightly change the collected web vital values and potentially also influence alerts and performance scores in the Sentry UI.
14+
15+
### Other Changes
16+
17+
- feat(deps): Bump @sentry/rollup-plugin from 3.4.0 to 3.5.0 ([#16524](https://github.com/getsentry/sentry-javascript/pull/16524))
18+
- feat(ember): Stop warning for `onError` usage ([#16547](https://github.com/getsentry/sentry-javascript/pull/16547))
19+
- feat(node): Allow to force activate `vercelAiIntegration` ([#16551](https://github.com/getsentry/sentry-javascript/pull/16551))
20+
- feat(node): Introduce `ignoreLayersType` option to koa integration ([#16553](https://github.com/getsentry/sentry-javascript/pull/16553))
21+
- fix(browser): Ensure `suppressTracing` does not leak when async ([#16545](https://github.com/getsentry/sentry-javascript/pull/16545))
22+
- fix(vue): Ensure root component render span always ends ([#16488](https://github.com/getsentry/sentry-javascript/pull/16488))
23+
724
## 9.28.1
825

926
- feat(deps): Bump @sentry/cli from 2.45.0 to 2.46.0 ([#16516](https://github.com/getsentry/sentry-javascript/pull/16516))

dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp-late/test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { sentryTest } from '../../../../utils/fixtures';
44
import {
55
getFirstSentryEnvelopeRequest,
66
getMultipleSentryEnvelopeRequests,
7+
hidePage,
78
properFullEnvelopeRequestParser,
89
shouldSkipTracingTest,
910
} from '../../../../utils/helpers';
@@ -33,9 +34,7 @@ sentryTest('should capture an INP click event span after pageload', async ({ bro
3334
await page.waitForTimeout(500);
3435

3536
// Page hide to trigger INP
36-
await page.evaluate(() => {
37-
window.dispatchEvent(new Event('pagehide'));
38-
});
37+
await hidePage(page);
3938

4039
// Get the INP span envelope
4140
const spanEnvelope = (await spanEnvelopePromise)[0];

dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp-parametrized-late/test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { sentryTest } from '../../../../utils/fixtures';
44
import {
55
getFirstSentryEnvelopeRequest,
66
getMultipleSentryEnvelopeRequests,
7+
hidePage,
78
properFullEnvelopeRequestParser,
89
shouldSkipTracingTest,
910
} from '../../../../utils/helpers';
@@ -35,9 +36,7 @@ sentryTest(
3536
await page.waitForTimeout(500);
3637

3738
// Page hide to trigger INP
38-
await page.evaluate(() => {
39-
window.dispatchEvent(new Event('pagehide'));
40-
});
39+
await hidePage(page);
4140

4241
// Get the INP span envelope
4342
const spanEnvelope = (await spanEnvelopePromise)[0];

dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp-parametrized/test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import type { SpanEnvelope } from '@sentry/core';
33
import { sentryTest } from '../../../../utils/fixtures';
44
import {
55
getMultipleSentryEnvelopeRequests,
6+
hidePage,
67
properFullEnvelopeRequestParser,
78
shouldSkipTracingTest,
89
} from '../../../../utils/helpers';
@@ -33,9 +34,7 @@ sentryTest(
3334
await page.waitForTimeout(500);
3435

3536
// Page hide to trigger INP
36-
await page.evaluate(() => {
37-
window.dispatchEvent(new Event('pagehide'));
38-
});
37+
await hidePage(page);
3938

4039
// Get the INP span envelope
4140
const spanEnvelope = (await spanEnvelopePromise)[0];

dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp/init.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Sentry.init({
1414
}),
1515
],
1616
tracesSampleRate: 1,
17+
debug: true,
1718
});
1819

1920
const client = Sentry.getClient();

dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp/test.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { sentryTest } from '../../../../utils/fixtures';
44
import {
55
getFirstSentryEnvelopeRequest,
66
getMultipleSentryEnvelopeRequests,
7+
hidePage,
78
properFullEnvelopeRequestParser,
89
shouldSkipTracingTest,
910
} from '../../../../utils/helpers';
@@ -32,9 +33,7 @@ sentryTest('should capture an INP click event span during pageload', async ({ br
3233
await page.waitForTimeout(500);
3334

3435
// Page hide to trigger INP
35-
await page.evaluate(() => {
36-
window.dispatchEvent(new Event('pagehide'));
37-
});
36+
await hidePage(page);
3837

3938
// Get the INP span envelope
4039
const spanEnvelope = (await spanEnvelopePromise)[0];
@@ -118,6 +117,14 @@ sentryTest(
118117
});
119118

120119
// Page hide to trigger INP
120+
121+
// Important: Purposefully not using hidePage() here to test the hidden state
122+
// via the `pagehide` event. This is necessary because iOS Safari 14.4
123+
// still doesn't fully emit the `visibilitychange` events but it's the lower
124+
// bound for Safari on iOS that we support.
125+
// If this test times out or fails, it's likely because we tried updating
126+
// the web-vitals library which officially already dropped support for
127+
// this iOS version
121128
await page.evaluate(() => {
122129
window.dispatchEvent(new Event('pagehide'));
123130
});

dev-packages/e2e-tests/test-applications/nestjs-11/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,10 @@
4444
"ts-loader": "^9.4.3",
4545
"tsconfig-paths": "^4.2.0",
4646
"typescript": "~5.0.0"
47+
},
48+
"pnpm": {
49+
"overrides": {
50+
"minimatch": "10.0.1"
51+
}
4752
}
4853
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
"@sentry/nextjs": "latest || *",
1818
"@t3-oss/env-nextjs": "^0.10.1",
1919
"@tanstack/react-query": "^5.50.0",
20-
"@trpc/client": "^11.0.0-rc.446",
21-
"@trpc/react-query": "^11.0.0-rc.446",
22-
"@trpc/server": "^11.0.0-rc.446",
20+
"@trpc/client": "~11.3.0",
21+
"@trpc/react-query": "~11.3.0",
22+
"@trpc/server": "~11.3.0",
2323
"geist": "^1.3.0",
2424
"next": "14.2.29",
2525
"react": "18.3.1",

dev-packages/node-integration-tests/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,20 @@ To run tests with Vitest's watch mode:
4747
To filter tests by their title:
4848

4949
`yarn test -t "set different properties of a scope"`
50+
51+
## Debugging Tests
52+
53+
To enable verbose logging during test execution, set the `DEBUG` environment variable:
54+
55+
`DEBUG=1 yarn test`
56+
57+
When `DEBUG` is enabled, the test runner will output:
58+
59+
- Test scenario startup information (path, flags, DSN)
60+
- Docker Compose output when using `withDockerCompose`
61+
- Child process stdout and stderr output
62+
- HTTP requests made during tests
63+
- Process errors and exceptions
64+
- Line-by-line output from test scenarios
65+
66+
This is particularly useful when debugging failing tests or understanding the test execution flow.

dev-packages/opentelemetry-v2-tests/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
"node": ">=18"
88
},
99
"scripts": {
10+
"lint": "eslint . --format stylish",
11+
"fix": "eslint . --format stylish --fix",
1012
"test": "vitest run",
1113
"test:watch": "vitest --watch"
1214
},

dev-packages/opentelemetry-v2-tests/test/helpers/isSpan.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { Span } from '@opentelemetry/api';
2-
import { INVALID_TRACEID, INVALID_SPANID, type SpanContext } from '@opentelemetry/api';
2+
import { type SpanContext, INVALID_SPANID, INVALID_TRACEID } from '@opentelemetry/api';
33

44
export const isSpan = (value: unknown): value is Span => {
55
return (

dev-packages/opentelemetry-v2-tests/test/helpers/mockSdkInit.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import { BasicTracerProvider } from '@opentelemetry/sdk-trace-base';
33
import type { ClientOptions, Options } from '@sentry/core';
44
import { flush, getClient, getCurrentScope, getGlobalScope, getIsolationScope } from '@sentry/core';
55
import { setOpenTelemetryContextAsyncContextStrategy } from '../../../../packages/opentelemetry/src/asyncContextStrategy';
6+
import { SentrySpanProcessor } from '../../../../packages/opentelemetry/src/spanProcessor';
67
import type { OpenTelemetryClient } from '../../../../packages/opentelemetry/src/types';
78
import { clearOpenTelemetrySetupCheck } from '../../../../packages/opentelemetry/src/utils/setupCheck';
89
import { initOtel } from './initOtel';
910
import { init as initTestClient } from './TestClient';
10-
import { SentrySpanProcessor } from '../../../../packages/opentelemetry/src/spanProcessor';
1111

1212
const PUBLIC_DSN = 'https://username@domain/123';
1313

dev-packages/opentelemetry-v2-tests/test/integration/transactions.test.ts

Lines changed: 38 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { afterEach, describe, expect, it, vi } from 'vitest';
1616
import { SENTRY_TRACE_STATE_DSC } from '../../../../packages/opentelemetry/src/constants';
1717
import { startInactiveSpan, startSpan } from '../../../../packages/opentelemetry/src/trace';
1818
import { makeTraceState } from '../../../../packages/opentelemetry/src/utils/makeTraceState';
19-
import { cleanupOtel, getProvider, getSpanProcessor, mockSdkInit } from '../helpers/mockSdkInit';
19+
import { cleanupOtel, getSpanProcessor, mockSdkInit } from '../helpers/mockSdkInit';
2020
import type { TestClientInterface } from '../helpers/TestClient';
2121

2222
describe('Integration | Transactions', () => {
@@ -514,7 +514,6 @@ describe('Integration | Transactions', () => {
514514
},
515515
});
516516

517-
const provider = getProvider();
518517
const spanProcessor = getSpanProcessor();
519518

520519
const exporter = spanProcessor ? spanProcessor['_exporter'] : undefined;
@@ -548,57 +547,56 @@ describe('Integration | Transactions', () => {
548547
expect(finishedSpans.length).toBe(0);
549548
});
550549

551-
it('collects child spans that are finished within 5 minutes their parent span has been sent', async () => {
552-
const timeout = 5 * 60 * 1000;
553-
const now = Date.now();
554-
vi.useFakeTimers();
555-
vi.setSystemTime(now);
550+
it('collects child spans that are finished within 5 minutes their parent span has been sent', async () => {
551+
const timeout = 5 * 60 * 1000;
552+
const now = Date.now();
553+
vi.useFakeTimers();
554+
vi.setSystemTime(now);
556555

557-
const logs: unknown[] = [];
558-
vi.spyOn(logger, 'log').mockImplementation(msg => logs.push(msg));
556+
const logs: unknown[] = [];
557+
vi.spyOn(logger, 'log').mockImplementation(msg => logs.push(msg));
559558

560-
const transactions: Event[] = [];
559+
const transactions: Event[] = [];
561560

562-
mockSdkInit({
563-
tracesSampleRate: 1,
564-
beforeSendTransaction: event => {
565-
transactions.push(event);
566-
return null;
567-
},
568-
});
561+
mockSdkInit({
562+
tracesSampleRate: 1,
563+
beforeSendTransaction: event => {
564+
transactions.push(event);
565+
return null;
566+
},
567+
});
569568

570-
const provider = getProvider();
571-
const spanProcessor = getSpanProcessor();
569+
const spanProcessor = getSpanProcessor();
572570

573-
const exporter = spanProcessor ? spanProcessor['_exporter'] : undefined;
571+
const exporter = spanProcessor ? spanProcessor['_exporter'] : undefined;
574572

575-
if (!exporter) {
576-
throw new Error('No exporter found, aborting test...');
577-
}
573+
if (!exporter) {
574+
throw new Error('No exporter found, aborting test...');
575+
}
578576

579-
startSpanManual({ name: 'test name' }, async span => {
580-
const subSpan = startInactiveSpan({ name: 'inner span 1' });
581-
subSpan.end();
577+
startSpanManual({ name: 'test name' }, async span => {
578+
const subSpan = startInactiveSpan({ name: 'inner span 1' });
579+
subSpan.end();
582580

583-
const subSpan2 = startInactiveSpan({ name: 'inner span 2' });
581+
const subSpan2 = startInactiveSpan({ name: 'inner span 2' });
584582

585-
span.end();
583+
span.end();
586584

587-
setTimeout(() => {
588-
subSpan2.end();
589-
}, timeout - 2);
590-
});
585+
setTimeout(() => {
586+
subSpan2.end();
587+
}, timeout - 2);
588+
});
591589

592-
vi.advanceTimersByTime(timeout - 1);
590+
vi.advanceTimersByTime(timeout - 1);
593591

594-
expect(transactions).toHaveLength(2);
595-
expect(transactions[0]?.spans).toHaveLength(1);
592+
expect(transactions).toHaveLength(2);
593+
expect(transactions[0]?.spans).toHaveLength(1);
596594

597-
const finishedSpans: any = exporter['_finishedSpanBuckets'].flatMap(bucket =>
598-
bucket ? Array.from(bucket.spans) : [],
599-
);
600-
expect(finishedSpans.length).toBe(0);
601-
});
595+
const finishedSpans: any = exporter['_finishedSpanBuckets'].flatMap(bucket =>
596+
bucket ? Array.from(bucket.spans) : [],
597+
);
598+
expect(finishedSpans.length).toBe(0);
599+
});
602600

603601
it('discards child spans that are finished after 5 minutes their parent span has been sent', async () => {
604602
const timeout = 5 * 60 * 1000;
@@ -619,7 +617,6 @@ it('collects child spans that are finished within 5 minutes their parent span ha
619617
},
620618
});
621619

622-
const provider = getProvider();
623620
const spanProcessor = getSpanProcessor();
624621

625622
const exporter = spanProcessor ? spanProcessor['_exporter'] : undefined;

dev-packages/opentelemetry-v2-tests/test/trace.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ import {
2828
} from '../../../packages/opentelemetry/src/trace';
2929
import type { AbstractSpan } from '../../../packages/opentelemetry/src/types';
3030
import { getActiveSpan } from '../../../packages/opentelemetry/src/utils/getActiveSpan';
31+
import { getParentSpanId } from '../../../packages/opentelemetry/src/utils/getParentSpanId';
3132
import { getSamplingDecision } from '../../../packages/opentelemetry/src/utils/getSamplingDecision';
3233
import { getSpanKind } from '../../../packages/opentelemetry/src/utils/getSpanKind';
3334
import { makeTraceState } from '../../../packages/opentelemetry/src/utils/makeTraceState';
3435
import { spanHasAttributes, spanHasName } from '../../../packages/opentelemetry/src/utils/spanTypes';
35-
import { cleanupOtel, mockSdkInit } from './helpers/mockSdkInit';
3636
import { isSpan } from './helpers/isSpan';
37-
import { getParentSpanId } from '../../../packages/opentelemetry/src/utils/getParentSpanId';
37+
import { cleanupOtel, mockSdkInit } from './helpers/mockSdkInit';
3838

3939
describe('trace', () => {
4040
beforeEach(() => {

packages/browser-utils/src/metrics/cls.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ export function trackClsAsStandaloneSpan(): void {
5858
standaloneClsEntry = entry;
5959
}, true);
6060

61+
// TODO: Figure out if we can switch to using whenIdleOrHidden instead of onHidden
6162
// use pagehide event from web-vitals
6263
onHidden(() => {
6364
_collectClsOnce();

packages/browser-utils/src/metrics/web-vitals/README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
> A modular library for measuring the [Web Vitals](https://web.dev/vitals/) metrics on real users.
44
5-
This was vendored from: https://github.com/GoogleChrome/web-vitals: v3.5.2
5+
This was vendored from: https://github.com/GoogleChrome/web-vitals: v5.0.2
66

77
The commit SHA used is:
8-
[3d2b3dc8576cc003618952fa39902fab764a53e2](https://github.com/GoogleChrome/web-vitals/tree/3d2b3dc8576cc003618952fa39902fab764a53e2)
8+
[463abbd425cda01ed65e0b5d18be9f559fe446cb](https://github.com/GoogleChrome/web-vitals/tree/463abbd425cda01ed65e0b5d18be9f559fe446cb)
99

1010
Current vendored web vitals are:
1111

@@ -27,6 +27,12 @@ web-vitals only report once per pageload.
2727

2828
## CHANGELOG
2929

30+
https://github.com/getsentry/sentry-javascript/pull/16492
31+
32+
- Bumped from Web Vitals 4.2.5 to 5.0.2
33+
- Mainly fixes some INP, LCP and FCP edge cases
34+
- Original library removed FID; we still keep it around for now
35+
3036
https://github.com/getsentry/sentry-javascript/pull/14439
3137

3238
- Bumped from Web Vitals v3.5.2 to v4.2.4

0 commit comments

Comments
 (0)