Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a3a2008

Browse files
authored
Merge branch 'develop' into develop
2 parents af12b07 + 38bd57b commit a3a2008

File tree

424 files changed

+7758
-2396
lines changed

Some content is hidden

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

424 files changed

+7758
-2396
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,8 +436,6 @@ jobs:
436436
env:
437437
DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }}
438438
- name: Run tests
439-
env:
440-
NODE_VERSION: 16
441439
run: yarn test-ci-browser
442440
- name: Compute test coverage
443441
uses: codecov/codecov-action@v4
@@ -994,6 +992,7 @@ jobs:
994992
test-application:
995993
[
996994
'angular-17',
995+
'angular-18',
997996
'cloudflare-astro',
998997
'node-express',
999998
'create-react-app',
@@ -1004,9 +1003,13 @@ jobs:
10041003
'create-remix-app-express-vite-dev',
10051004
'debug-id-sourcemaps',
10061005
'node-express-esm-loader',
1006+
'node-express-esm-preload',
10071007
'node-express-esm-without-loader',
1008+
'node-express-cjs-preload',
10081009
'nextjs-app-dir',
10091010
'nextjs-14',
1011+
'nextjs-15',
1012+
'react-19',
10101013
'react-create-hash-router',
10111014
'react-router-6-use-routes',
10121015
'react-router-5',

.github/workflows/canary.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,12 @@ jobs:
8383
- test-application: 'nextjs-14'
8484
build-command: 'test:build-latest'
8585
label: 'nextjs-14 (latest)'
86+
- test-application: 'nextjs-15'
87+
build-command: 'test:build-canary'
88+
label: 'nextjs-15 (canary)'
89+
- test-application: 'nextjs-15'
90+
build-command: 'test:build-latest'
91+
label: 'nextjs-15 (latest)'
8692
- test-application: 'react-create-hash-router'
8793
build-command: 'test:build-canary'
8894
label: 'react-create-hash-router (canary)'
@@ -153,7 +159,8 @@ jobs:
153159
strategy:
154160
fail-fast: false
155161
matrix:
156-
scenario: [ember-release, embroider-optimized, ember-4.0]
162+
# scenario: [ember-release, embroider-optimized, ember-4.0]
163+
scenario: [ember-4.0]
157164
steps:
158165
- name: 'Check out current commit'
159166
uses: actions/checkout@v4

.madgerc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"detectiveOptions": {
3+
"ts": {
4+
"skipTypeImports": true
5+
}
6+
}
7+
}

.size-limit.js

Lines changed: 21 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
const builtinModules = require('module').builtinModules;
2+
const nodePrefixedBuiltinModules = builtinModules.map(m => `node:${m}`);
3+
14
module.exports = [
25
// Browser SDK (ESM)
36
{
@@ -54,6 +57,20 @@ module.exports = [
5457
gzip: true,
5558
limit: '87 KB',
5659
},
60+
{
61+
name: '@sentry/browser (incl. Tracing, Replay, Feedback, metrics)',
62+
path: 'packages/browser/build/npm/esm/index.js',
63+
import: createImport('init', 'browserTracingIntegration', 'replayIntegration', 'feedbackIntegration', 'metrics'),
64+
gzip: true,
65+
limit: '100 KB',
66+
},
67+
{
68+
name: '@sentry/browser (incl. metrics)',
69+
path: 'packages/browser/build/npm/esm/index.js',
70+
import: createImport('init', 'metrics'),
71+
gzip: true,
72+
limit: '40 KB',
73+
},
5774
{
5875
name: '@sentry/browser (incl. Feedback)',
5976
path: 'packages/browser/build/npm/esm/index.js',
@@ -80,13 +97,15 @@ module.exports = [
8097
name: '@sentry/react',
8198
path: 'packages/react/build/esm/index.js',
8299
import: createImport('init', 'ErrorBoundary'),
100+
ignore: ['react/jsx-runtime'],
83101
gzip: true,
84102
limit: '27 KB',
85103
},
86104
{
87105
name: '@sentry/react (incl. Tracing)',
88106
path: 'packages/react/build/esm/index.js',
89107
import: createImport('init', 'ErrorBoundary', 'reactRouterV6BrowserTracingIntegration'),
108+
ignore: ['react/jsx-runtime'],
90109
gzip: true,
91110
limit: '37 KB',
92111
},
@@ -190,24 +209,7 @@ module.exports = [
190209
name: '@sentry/node',
191210
path: 'packages/node/build/esm/index.js',
192211
import: createImport('init'),
193-
ignore: [
194-
'node:http',
195-
'node:https',
196-
'node:diagnostics_channel',
197-
'async_hooks',
198-
'child_process',
199-
'fs',
200-
'os',
201-
'path',
202-
'inspector',
203-
'worker_threads',
204-
'http',
205-
'stream',
206-
'zlib',
207-
'net',
208-
'tls',
209-
'module',
210-
],
212+
ignore: [...builtinModules, ...nodePrefixedBuiltinModules],
211213
gzip: true,
212214
limit: '180 KB',
213215
},
@@ -216,25 +218,7 @@ module.exports = [
216218
name: '@sentry/aws-serverless',
217219
path: 'packages/aws-serverless/build/npm/esm/index.js',
218220
import: createImport('init'),
219-
ignore: [
220-
'node:http',
221-
'node:https',
222-
'node:diagnostics_channel',
223-
'async_hooks',
224-
'child_process',
225-
'perf_hooks',
226-
'fs',
227-
'os',
228-
'path',
229-
'inspector',
230-
'worker_threads',
231-
'http',
232-
'stream',
233-
'zlib',
234-
'net',
235-
'tls',
236-
'module',
237-
],
221+
ignore: [...builtinModules, ...nodePrefixedBuiltinModules],
238222
gzip: true,
239223
limit: '140 KB',
240224
},

CHANGELOG.md

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

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

7+
## 8.5.0
8+
9+
### Important Changes
10+
11+
- **feat(react): Add React 19 to peer deps (#12207)**
12+
13+
This release adds support for React 19 in the `@sentry/react` SDK package.
14+
15+
- **feat(node): Add `@sentry/node/preload` hook (#12213)**
16+
17+
This release adds a new way to initialize `@sentry/node`, which allows you to use the SDK with performance
18+
instrumentation even if you cannot call `Sentry.init()` at the very start of your app.
19+
20+
First, run the SDK like this:
21+
22+
```bash
23+
node --require @sentry/node/preload ./app.js
24+
```
25+
26+
Now, you can initialize and import the rest of the SDK later or asynchronously:
27+
28+
```js
29+
const express = require('express');
30+
const Sentry = require('@sentry/node');
31+
32+
const dsn = await getSentryDsn();
33+
Sentry.init({ dsn });
34+
```
35+
36+
For more details, head over to the
37+
[PR Description of the new feature](https://github.com/getsentry/sentry-javascript/pull/12213). Our docs will be updated
38+
soon with a new guide.
39+
40+
### Other Changes
41+
42+
- feat(browser): Do not include metrics in base CDN bundle (#12230)
43+
- feat(core): Add `startNewTrace` API (#12138)
44+
- feat(core): Allow to pass custom scope to `captureFeedback()` (#12216)
45+
- feat(core): Only allow `SerializedSession` in session envelope items (#11979)
46+
- feat(nextjs): Use Vercel's `waitUntil` to defer freezing of Vercel Lambdas (#12133)
47+
- feat(node): Ensure manual OTEL setup works (#12214)
48+
- fix(aws-serverless): Avoid minifying `Module._resolveFilename` in Lambda layer bundle (#12232)
49+
- fix(aws-serverless): Ensure lambda layer uses default export from `ImportInTheMiddle` (#12233)
50+
- fix(browser): Improve browser extension error message check (#12146)
51+
- fix(browser): Remove optional chaining in INP code (#12196)
52+
- fix(nextjs): Don't report React postpone errors (#12194)
53+
- fix(nextjs): Use global scope for generic event filters (#12205)
54+
- fix(node): Add origin to redis span (#12201)
55+
- fix(node): Change import of `@prisma/instrumentation` to use default import (#12185)
56+
- fix(node): Only import `inspector` asynchronously (#12231)
57+
- fix(replay): Update matcher for hydration error detection to new React docs (#12209)
58+
- ref(profiling-node): Add warning when using non-LTS node (#12211)
59+
60+
## 8.4.0
61+
62+
### Important Changes
63+
64+
- **feat(nextjs): Trace pageloads in App Router (#12157)**
65+
66+
If you are using Next.js version `14.3.0-canary.64` or above, the Sentry Next.js SDK will now trace clientside pageloads
67+
with React Server Components. This means, that client-side errors like
68+
`Error: An error occurred in the Server Components render.`, which previously didn't give you much information on how
69+
that error was caused, can now be traced back to a specific error in a server component.
70+
71+
- **feat(angular): Add Support for Angular 18 (#12183)**
72+
73+
This release guarantees support for Angular 18 with `@sentry/angular`.
74+
75+
### Other Changes
76+
77+
- feat(deps): Bump @opentelemetry/instrumentation-aws-lambda from 0.41.0 to 0.41.1 (#12078)
78+
- fix(metrics): Ensure string values are interpreted for metrics (#12165)
79+
80+
## 8.3.0
81+
82+
### Important Changes
83+
84+
- **Better Node Framework Span Data**
85+
86+
This release improves data quality of spans emitted by Express, Fastify, Connect, Koa, Nest.js and Hapi.
87+
88+
- feat(node): Ensure connect spans have better data (#12130)
89+
- feat(node): Ensure express spans have better data (#12107)
90+
- feat(node): Ensure fastify spans have better data (#12106)
91+
- feat(node): Ensure hapi spans have better data (#12140)
92+
- feat(node): Ensure koa spans have better data (#12108)
93+
- feat(node): Ensure Nest.js spans have better data (#12139)
94+
- feat(deps): Bump @opentelemetry/instrumentation-express from 0.38.0 to 0.39.0 (#12079)
95+
96+
- **feat(node): No-code init via `--import=@sentry/node/init` (#11999)**
97+
98+
When using Sentry in ESM mode, you can now use Sentry without manually calling init like this:
99+
100+
```bash
101+
SENTRY_DSN=https://[email protected]/0 node --import=@sentry/node/init app.mjs
102+
```
103+
104+
When using CommonJS, you can do:
105+
106+
```bash
107+
SENTRY_DSN=https://[email protected]/0 node --require=@sentry/node/init app.js
108+
```
109+
110+
### Other Changes
111+
112+
- chore: Align and update MIT license dates (#12143)
113+
- chore: Resolve or postpone a random assortment of TODOs (#11977)
114+
- doc(migration): Add entry for runWithAsyncContext (#12153)
115+
- docs: Add migration docs to point out that default import does not work (#12100)
116+
- docs(sveltekit): process.env.SENTRY_AUTH_TOKEN (#12118)
117+
- feat(browser): Ensure `browserProfilingIntegration` is published to CDN (#12158)
118+
- feat(google-cloud): Expose ESM build (#12149)
119+
- feat(nextjs): Ignore Prisma critical dependency warnings (#12144)
120+
- feat(node): Add app.free_memory info to events (#12150)
121+
- feat(node): Do not create GraphQL resolver spans by default (#12097)
122+
- feat(node): Use `node:` prefix for node built-ins (#11895)
123+
- feat(replay): Use unwrapped `setTimeout` to avoid e.g. angular change detection (#11924)
124+
- fix(core): Add dsn to span envelope header (#12096)
125+
- fix(feedback): Improve feedback border color in dark-mode, and prevent auto-dark mode when a theme is picked (#12126)
126+
- fix(feedback): Set optionOverrides to be optional in TS definition (#12125)
127+
- fix(nextjs): Don't put `undefined` values in props (#12131)
128+
- fix(nextjs): Fix legacy configuration method detection for emitting warning (#12136)
129+
- fix(node): Ensure fetch/http breadcrumbs are created correctly (#12137)
130+
- fix(node): Update `@prisma/instrumentation` from 5.13.0 to 5.14.0 (#12081)
131+
- ref(node): Add log for running in ESM/CommonJS mode (#12134)
132+
- ref(node): Handle failing hook registration gracefully (#12135)
133+
- ref(node): Only show instrumentation warning when tracing is enabled (#12141)
134+
135+
Work in this release contributed by @pboling. Thank you for your contribution!
136+
7137
## 8.2.1
8138

9139
- fix(aws-serverless): Fix build of lambda layer (#12083)

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2024 Functional Software, Inc. dba Sentry
3+
Copyright (c) 2012-2024 Functional Software, Inc. dba Sentry
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of
66
this software and associated documentation files (the "Software"), to deal in

MIGRATION.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,10 +706,11 @@ You can import from `@sentry/browser` (or from a respective SDK package like `@s
706706
707707
### Server-side SDKs (Node, Deno, Bun, etc.)
708708
709-
Removed top-level exports: `enableAnrDetection`, `Anr`, `deepReadDirSync`
709+
Removed top-level exports: `enableAnrDetection`, `Anr`, `deepReadDirSync`, `runWithAsyncContext`
710710
711711
- [Removal of `enableAnrDetection` and `Anr` class](./MIGRATION.md#removal-of-enableanrdetection-and-anr-class)
712712
- [Removal of `deepReadDirSync` method](./MIGRATION.md#removal-of-deepreaddirsync-method)
713+
- [Removal of `runWithAsyncContext` method](./MIGRATION.md#removal-of-runwithasynccontext-method)
713714
714715
#### Removal of `enableAnrDetection` and `Anr` class
715716
@@ -720,6 +721,22 @@ The `enableAnrDetection` and `Anr` class have been removed. See the
720721
721722
The `deepReadDirSync` method has been removed. There is no replacement API.
722723
724+
#### Removal of `runWithAsyncContext` method
725+
726+
The `runWithAsyncContext` method has been removed in favour of `Sentry.withIsolationScope`.
727+
728+
```js
729+
// before (v7)
730+
Sentry.runWithAsyncContext(() => {
731+
// Your code here...
732+
});
733+
734+
// after (v8)
735+
Sentry.withIsolationScope(() => {
736+
// Your code here...
737+
});
738+
```
739+
723740
### Next.js SDK
724741
725742
Removed top-level exports: `withSentryApi`, `withSentryAPI`, `withSentryGetServerSideProps`, `withSentryGetStaticProps`,
@@ -1323,6 +1340,14 @@ export class HeaderComponent {
13231340
}
13241341
```
13251342

1343+
## 6. Build Changes
1344+
1345+
We now provide a proper ESM output of the SDK. There have also been some other build changes under the hood. One side
1346+
effect of this is that importing Sentry as a default import does not work anymore. Note that this was never supported
1347+
(even on v7) and this was never intended to work (and also not documented anywhere). However, it seems that for some
1348+
configuration combinations, it was still possible to do `import Sentry from '@sentry/browser'`. This is not possible
1349+
anymore in v8. Please use `import * as Sentry from '@sentry/browser'` instead.
1350+
13261351
# Upgrading Sentry Feedback (beta, 7.x to 8.0)
13271352

13281353
For details on upgrading Feedback from the beta 7.x to the release 8.x version, please view the

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.2.1",
3+
"version": "8.5.0",
44
"main": "index.js",
55
"license": "MIT",
66
"engines": {
@@ -42,7 +42,7 @@
4242
"@babel/preset-typescript": "^7.16.7",
4343
"@playwright/test": "^1.43.1",
4444
"@sentry-internal/rrweb": "2.11.0",
45-
"@sentry/browser": "8.2.1",
45+
"@sentry/browser": "8.5.0",
4646
"axios": "1.6.7",
4747
"babel-loader": "^8.2.2",
4848
"html-webpack-plugin": "^5.5.0",

dev-packages/browser-integration-tests/suites/metrics/init.js renamed to dev-packages/browser-integration-tests/suites/metrics/metricsEvent/init.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ Sentry.init({
77
});
88

99
Sentry.metrics.increment('increment');
10-
Sentry.metrics.increment('increment');
10+
Sentry.metrics.increment('increment', 2);
11+
Sentry.metrics.increment('increment', '3');
1112
Sentry.metrics.distribution('distribution', 42);
12-
Sentry.metrics.distribution('distribution', 45);
13+
Sentry.metrics.distribution('distribution', '45');
1314
Sentry.metrics.gauge('gauge', 5);
14-
Sentry.metrics.gauge('gauge', 15);
15+
Sentry.metrics.gauge('gauge', '15');
1516
Sentry.metrics.set('set', 'nope');
1617
Sentry.metrics.set('set', 'another');

0 commit comments

Comments
 (0)