Skip to content

Commit fae7f8c

Browse files
committed
Merge branch 'develop' into timfish/feat/anr-disable-callback
2 parents e3d3f29 + b271bc8 commit fae7f8c

File tree

846 files changed

+5324
-2534
lines changed

Some content is hidden

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

846 files changed

+5324
-2534
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: 8 additions & 8 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)',
@@ -79,7 +79,7 @@ module.exports = [
7979
path: 'packages/browser/build/npm/esm/index.js',
8080
import: createImport('init', 'browserTracingIntegration', 'replayIntegration', 'replayCanvasIntegration'),
8181
gzip: true,
82-
limit: '78.2 KB',
82+
limit: '79 KB',
8383
},
8484
{
8585
name: '@sentry/browser (incl. Tracing, Replay, Feedback)',
@@ -107,7 +107,7 @@ module.exports = [
107107
path: 'packages/browser/build/npm/esm/index.js',
108108
import: createImport('init', 'feedbackAsyncIntegration'),
109109
gzip: true,
110-
limit: '33 KB',
110+
limit: '34 KB',
111111
},
112112
// React SDK (ESM)
113113
{
@@ -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
{
@@ -160,7 +160,7 @@ module.exports = [
160160
name: 'CDN Bundle (incl. Tracing)',
161161
path: createCDNPath('bundle.tracing.min.js'),
162162
gzip: true,
163-
limit: '38 KB',
163+
limit: '39 KB',
164164
},
165165
{
166166
name: 'CDN Bundle (incl. Tracing, Replay)',
@@ -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: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,112 @@
1010

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

13+
Work in this release was contributed by @NEKOYASAN. Thank you for your contribution!
14+
15+
## 8.40.0
16+
17+
### Important Changes
18+
19+
- **feat(angular): Support Angular 19 ([#14398](https://github.com/getsentry/sentry-javascript/pull/14398))**
20+
21+
The `@sentry/angular` SDK can now be used with Angular 19. If you're upgrading to the new Angular version, you might want to migrate from the now deprecated `APP_INITIALIZER` token to `provideAppInitializer`.
22+
In this case, change the Sentry `TraceService` initialization in `app.config.ts`:
23+
24+
```ts
25+
// Angular 18
26+
export const appConfig: ApplicationConfig = {
27+
providers: [
28+
// other providers
29+
{
30+
provide: TraceService,
31+
deps: [Router],
32+
},
33+
{
34+
provide: APP_INITIALIZER,
35+
useFactory: () => () => {},
36+
deps: [TraceService],
37+
multi: true,
38+
},
39+
],
40+
};
41+
42+
// Angular 19
43+
export const appConfig: ApplicationConfig = {
44+
providers: [
45+
// other providers
46+
{
47+
provide: TraceService,
48+
deps: [Router],
49+
},
50+
provideAppInitializer(() => {
51+
inject(TraceService);
52+
}),
53+
],
54+
};
55+
```
56+
57+
- **feat(core): Deprecate `debugIntegration` and `sessionTimingIntegration` ([#14363](https://github.com/getsentry/sentry-javascript/pull/14363))**
58+
59+
The `debugIntegration` was deprecated and will be removed in the next major version of the SDK.
60+
To log outgoing events, use [Hook Options](https://docs.sentry.io/platforms/javascript/configuration/options/#hooks) (`beforeSend`, `beforeSendTransaction`, ...).
61+
62+
The `sessionTimingIntegration` was deprecated and will be removed in the next major version of the SDK.
63+
To capture session durations alongside events, use [Context](https://docs.sentry.io/platforms/javascript/enriching-events/context/) (`Sentry.setContext()`).
64+
65+
- **feat(nestjs): Deprecate `@WithSentry` in favor of `@SentryExceptionCaptured` ([#14323](https://github.com/getsentry/sentry-javascript/pull/14323))**
66+
67+
The `@WithSentry` decorator was deprecated. Use `@SentryExceptionCaptured` instead. This is a simple renaming and functionality stays identical.
68+
69+
- **feat(nestjs): Deprecate `SentryTracingInterceptor`, `SentryService`, `SentryGlobalGenericFilter`, `SentryGlobalGraphQLFilter` ([#14371](https://github.com/getsentry/sentry-javascript/pull/14371))**
70+
71+
The `SentryTracingInterceptor` was deprecated. If you are using `@sentry/nestjs` you can safely remove any references to the `SentryTracingInterceptor`. If you are using another package migrate to `@sentry/nestjs` and remove the `SentryTracingInterceptor` afterwards.
72+
73+
The `SentryService` was deprecated and its functionality was added to `Sentry.init`. If you are using `@sentry/nestjs` you can safely remove any references to the `SentryService`. If you are using another package migrate to `@sentry/nestjs` and remove the `SentryService` afterwards.
74+
75+
The `SentryGlobalGenericFilter` was deprecated. Use the `SentryGlobalFilter` instead which is a drop-in replacement.
76+
77+
The `SentryGlobalGraphQLFilter` was deprecated. Use the `SentryGlobalFilter` instead which is a drop-in replacement.
78+
79+
- **feat(node): Deprecate `nestIntegration` and `setupNestErrorHandler` in favor of using `@sentry/nestjs` ([#14374](https://github.com/getsentry/sentry-javascript/pull/14374))**
80+
81+
The `nestIntegration` and `setupNestErrorHandler` functions from `@sentry/node` were deprecated and will be removed in the next major version of the SDK. If you're using `@sentry/node` in a NestJS application, we recommend switching to our new dedicated `@sentry/nestjs` package.
82+
83+
### Other Changes
84+
85+
- 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))
87+
- feat(core): Ensure `normalizedRequest` on `sdkProcessingMetadata` is merged ([#14315](https://github.com/getsentry/sentry-javascript/pull/14315))
88+
- feat(core): Hoist everything from `@sentry/utils` into `@sentry/core` ([#14382](https://github.com/getsentry/sentry-javascript/pull/14382))
89+
- fix(core): Do not throw when trying to fill readonly properties ([#14402](https://github.com/getsentry/sentry-javascript/pull/14402))
90+
- 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))
92+
- fix(nextjs): Update check for not found navigation error ([#14378](https://github.com/getsentry/sentry-javascript/pull/14378))
93+
94+
## 8.39.0
95+
96+
### Important Changes
97+
98+
- **feat(nestjs): Instrument event handlers ([#14307](https://github.com/getsentry/sentry-javascript/pull/14307))**
99+
100+
The `@sentry/nestjs` SDK will now capture performance data for [NestJS Events (`@nestjs/event-emitter`)](https://docs.nestjs.com/techniques/events)
101+
102+
### Other Changes
103+
104+
- feat(nestjs): Add alias `@SentryExceptionCaptured` for `@WithSentry` ([#14322](https://github.com/getsentry/sentry-javascript/pull/14322))
105+
- feat(nestjs): Duplicate `SentryService` behaviour into `@sentry/nestjs` SDK `init()` ([#14321](https://github.com/getsentry/sentry-javascript/pull/14321))
106+
- feat(nestjs): Handle GraphQL contexts in `SentryGlobalFilter` ([#14320](https://github.com/getsentry/sentry-javascript/pull/14320))
107+
- feat(node): Add alias `childProcessIntegration` for `processThreadBreadcrumbIntegration` and deprecate it ([#14334](https://github.com/getsentry/sentry-javascript/pull/14334))
108+
- feat(node): Ensure request bodies are reliably captured for http requests ([#13746](https://github.com/getsentry/sentry-javascript/pull/13746))
109+
- feat(replay): Upgrade rrweb packages to 2.29.0 ([#14160](https://github.com/getsentry/sentry-javascript/pull/14160))
110+
- fix(cdn): Ensure `_sentryModuleMetadata` is not mangled ([#14344](https://github.com/getsentry/sentry-javascript/pull/14344))
111+
- fix(core): Set `sentry.source` attribute to `custom` when calling `span.updateName` on `SentrySpan` ([#14251](https://github.com/getsentry/sentry-javascript/pull/14251))
112+
- fix(mongo): rewrite Buffer as ? during serialization ([#14071](https://github.com/getsentry/sentry-javascript/pull/14071))
113+
- fix(replay): Remove replay id from DSC on expired sessions ([#14342](https://github.com/getsentry/sentry-javascript/pull/14342))
114+
- ref(profiling) Fix electron crash ([#14216](https://github.com/getsentry/sentry-javascript/pull/14216))
115+
- ref(types): Deprecate `Request` type in favor of `RequestEventData` ([#14317](https://github.com/getsentry/sentry-javascript/pull/14317))
116+
- ref(utils): Stop setting `transaction` in `requestDataIntegration` ([#14306](https://github.com/getsentry/sentry-javascript/pull/14306))
117+
- ref(vue): Reduce bundle size for starting application render span ([#14275](https://github.com/getsentry/sentry-javascript/pull/14275))
118+
13119
## 8.38.0
14120

15121
- docs: Improve docstrings for node otel integrations ([#14217](https://github.com/getsentry/sentry-javascript/pull/14217))

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.38.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.38.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",

dev-packages/browser-integration-tests/scripts/detectFlakyTests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ ${changedPaths.join('\n')}
100100
* Returns how many time one test should run based on the chosen mode and a bunch of heuristics
101101
*/
102102
function getPerTestRunCount(testPaths: string[]) {
103-
if (process.env.TEST_RUN_COUNT === 'AUTO' && testPaths.length > 0) {
103+
if ((!process.env.TEST_RUN_COUNT || process.env.TEST_RUN_COUNT === 'AUTO') && testPaths.length > 0) {
104104
// Run everything up to 100x, assuming that total runtime is less than 60min.
105105
// We assume an average runtime of 3s per test, times 4 (for different browsers) = 12s per detected testPaths
106106
// We want to keep overall runtime under 30min

dev-packages/browser-integration-tests/suites/feedback/attachTo/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ sentryTest('should capture feedback with custom button', async ({ getLocalTestUr
2323
}
2424
});
2525

26-
const url = await getLocalTestUrl({ testDir: __dirname });
26+
const url = await getLocalTestUrl({ testDir: __dirname, handleLazyLoadedFeedback: true });
2727

2828
await page.goto(url);
2929
await page.locator('#custom-feedback-button').click();

dev-packages/browser-integration-tests/suites/feedback/captureFeedback/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ sentryTest('should capture feedback', async ({ getLocalTestUrl, page }) => {
2323
}
2424
});
2525

26-
const url = await getLocalTestUrl({ testDir: __dirname });
26+
const url = await getLocalTestUrl({ testDir: __dirname, handleLazyLoadedFeedback: true });
2727

2828
await page.goto(url);
2929
await page.getByText('Report a Bug').click();

dev-packages/browser-integration-tests/suites/feedback/captureFeedbackAndReplay/hasSampling/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ sentryTest('should capture feedback', async ({ forceFlushReplay, getLocalTestUrl
3131
}
3232
});
3333

34-
const url = await getLocalTestUrl({ testDir: __dirname });
34+
const url = await getLocalTestUrl({ testDir: __dirname, handleLazyLoadedFeedback: true });
3535

3636
await Promise.all([page.goto(url), page.getByText('Report a Bug').click(), reqPromise0]);
3737

dev-packages/browser-integration-tests/suites/feedback/captureFeedbackCsp/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ sentryTest('should capture feedback', async ({ getLocalTestUrl, page }) => {
2323
}
2424
});
2525

26-
const url = await getLocalTestUrl({ testDir: __dirname });
26+
const url = await getLocalTestUrl({ testDir: __dirname, handleLazyLoadedFeedback: true });
2727

2828
await page.goto(url);
2929
await page.getByText('Report a Bug').click();

0 commit comments

Comments
 (0)