8000 Merge pull request #12171 from getsentry/prepare-release/8.3.0 · mwdiaz/sentry-javascript@9e35ed9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9e35ed9

Browse files
authored
Merge pull request getsentry#12171 from getsentry/prepare-release/8.3.0
Prepare release/8.3.0
2 parents f6784c5 + 14d1c94 commit 9e35ed9

File tree

181 files changed

+2595
-1395
lines changed

Some content is hidden

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

181 files changed

+2595
-1395
lines changed

.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: 5 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
{
@@ -190,24 +193,7 @@ module.exports = [
190193
name: '@sentry/node',
191194
path: 'packages/node/build/esm/index.js',
192195
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-
],
196+
ignore: [...builtinModules, ...nodePrefixedBuiltinModules],
211197
gzip: true,
212198
limit: '180 KB',
213199
},
@@ -216,25 +202,7 @@ module.exports = [
216202
name: '@sentry/aws-serverless',
217203
path: 'packages/aws-serverless/build/npm/esm/index.js',
218204
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-
],
205+
ignore: [...builtinModules, ...nodePrefixedBuiltinModules],
238206
gzip: true,
239207
limit: '140 KB',
240208
},

CHANGELOG.md

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

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

7+
## 8.3.0
8+
9+
### Important Changes
10+
11+
- **Better Node Framework Span Data**
12+
13+
This release improves data quality of spans emitted by Express, Fastify, Connect, Koa, Nest.js and Hapi.
14+
15+
- feat(node): Ensure connect spans have better data (#12130)
16+
- feat(node): Ensure express spans have better data (#12107)
17+
- feat(node): Ensure fastify spans have better data (#12106)
18+
- feat(node): Ensure hapi spans have better data (#12140)
19+
- feat(node): Ensure koa spans have better data (#12108)
20+
- feat(node): Ensure Nest.js spans have better data (#12139)
21+
- feat(deps): Bump @opentelemetry/instrumentation-express from 0.38.0 to 0.39.0 (#12079)
22+
23+
- **feat(node): No-code init via `--import=@sentry/node/init` (#11999)**
24+
25+
When using Sentry in ESM mode, you can now use Sentry without manually calling init like this:
26+
27+
```bash
28+
SENTRY_DSN=https://examplePublicKey@o0.ingest.sentry.io/0 node --import=@sentry/node/init app.mjs
29+
```
30+
31+
When using CommonJS, you can do:
32+
33+
```bash
34+
SENTRY_DSN=https://examplePublicKey@o0.ingest.sentry.io/0 node --require=@sentry/node/init app.js
35+
```
36+
37+
### Other Changes
38+
39+
- chore: Align and update MIT license dates (#12143)
40+
- chore: Resolve or postpone a random assortment of TODOs (#11977)
41+
- doc(migration): Add entry for runWithAsyncContext (#12153)
42+
- docs: Add migration docs to point out that default import does not work (#12100)
43+
- docs(sveltekit): process.env.SENTRY_AUTH_TOKEN (#12118)
44+
- feat(browser): Ensure `browserProfilingIntegration` is published to CDN (#12158)
45+
- feat(google-cloud): Expose ESM build (#12149)
46+
- feat(nextjs): Ignore Prisma critical dependency warnings (#12144)
47+
- feat(node): Add app.free_memory info to events (#12150)
48+
- feat(node): Do not create GraphQL resolver spans by default (#12097)
49+
- feat(node): Use `node:` prefix for node built-ins (#11895)
50+
- feat(replay): Use unwrapped `setTimeout` to avoid e.g. angular change detection (#11924)
51+
- fix(core): Add dsn to span envelope header (#12096)
52+
- fix(feedback): Improve feedback border color in dark-mode, and prevent auto-dark mode when a theme is picked (#12126)
53+
- fix(feedback): Set optionOverrides to be optional in TS definition (#12125)
54+
- fix(nextjs): Don't put `undefined` values in props (#12131)
55+
- fix(nextjs): Fix legacy configuration method detection for emitting warning (#12136)
56+
- fix(node): Ensure fetch/http breadcrumbs are created correctly (#12137)
57+
- fix(node): Update `@prisma/instrumentation` from 5.13.0 to 5.14.0 (#12081)
58+
- ref(node): Add log for running in ESM/CommonJS mode (#12134)
59+
- ref(node): Handle failing hook registration gracefully (#12135)
60+
- ref(node): Only show instrumentation warning when tracing is enabled (#12141)
61 10000 +
62+
Work in this release contributed by @pboling. Thank you for your contribution!
63+
764
## 8.2.1
865

966
- 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/e2e-tests/test-applications/node-connect/playwright.config.ts renamed to dev-packages/e2e-tests/test-applications/node-connect/playwright.config.mjs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import type { PlaywrightTestConfig } from '@playwright/test';
21
import { devices } from '@playwright/test';
32

43
const connectPort = 3030;
@@ -7,7 +6,7 @@ const eventProxyPort = 3031;
76
/**
87
* See https://playwright.dev/docs/test-configuration.
98
*/
10-
const config: PlaywrightTestConfig = {
9+
const config = {
1110
testDir: './tests',
1211
/* Maximum time one test can run for. */
1312
timeout: 150_000,

dev-packages/e2e-tests/test-applications/node-connect/tests/transactions.test.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,20 +72,22 @@ test('Sends an API route transaction', async ({ baseURL }) => {
7272
},
7373
{
7474
data: {
75-
'sentry.origin': 'manual',
75+
'sentry.origin': 'auto.http.otel.connect',
76+
'sentry.op': 'request_handler.connect',
7677
'http.route': '/test-transaction',
7778
'connect.type': 'request_handler',
7879
'connect.name': '/test-transaction',
7980
'otel.kind': 'INTERNAL',
8081
},
81-
description: 'request handler - /test-transaction',
82+
op: 'request_handler.connect',
83+
description: '/test-transaction',
8284
parent_span_id: expect.any(String),
8385
span_id: expect.any(String),
8486
start_timestamp: expect.any(Number),
8587
status: 'ok',
8688
timestamp: expect.any(Number),
8789
trace_id: expect.any(String),
88-
origin: 'manual',
90+
origin: 'auto.http.otel.connect',
8991
},
9092
],
9193
transaction: 'GET /test-transaction',

dev-packages/e2e-tests/test-applications/node-connect/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
"strict": true,
77
"noEmit": true
88
},
9-
"include": ["*.ts"]
9+
"include": ["src/*.ts"]
1010
}

dev-packages/e2e-tests/test-applications/node-express-esm-loader/tests/server.test.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,10 @@ test('Should record a transaction for route with parameters', async ({ request }
6868
'http.route': '/',
6969
'otel.kind': 'INTERNAL',
7070
'sentry.origin': 'auto.http.otel.express',
71+
'sentry.op': 'middleware.express',
7172
},
72-
description: 'middleware - query',
73+
op: 'middleware.express',
74+
description: 'query',
7375
origin: 'auto.http.otel.express',
7476
parent_span_id: expect.any(String),
7577
span_id: expect.any(String),
@@ -86,8 +88,10 @@ test('Should record a transaction for route with parameters', async ({ request }
8688
'http.route': '/',
8789
'otel.kind': 'INTERNAL',
8890
'sentry.origin': 'auto.http.otel.express',
91+
'sentry.op': 'middleware.express',
8992
},
90-
description: 'middleware - expressInit',
93+
op: 'middleware.express',
94+
description: 'expressInit',
9195
origin: 'auto.http.otel.express',
9296
parent_span_id: expect.any(String),
9397
span_id: expect.any(String),
@@ -104,8 +108,10 @@ test('Should record a transaction for route with parameters', async ({ request }
104108
'http.route': '/test-transaction/:param',
105109
'otel.kind': 'INTERNAL',
106110
'sentry.origin': 'auto.http.otel.express',
111+
'sentry.op': 'request_handler.express',
107112
},
108-
description: 'request handler - /test-transaction/:param',
113+
op: 'request_handler.express',
114+
description: '/test-transaction/:param',
109115
origin: 'auto.http.otel.express',
110116
parent_span_id: expect.any(String),
111117
span_id: expect.any(String),

dev-packages/e2e-tests/test-applications/node-express/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"@types/node": "18.15.1",
2121
"express": "4.19.2",
2222
"typescript": "4.9.5",
23-
"zod": "^3.22.4"
23+
"zod": "~3.22.4"
2424
},
2525
"devDependencies": {
2626
"@sentry-internal/event-proxy-server": "link:../../../event-proxy-server",

dev-packages/e2e-tests/test-applications/node-express/tests/transaction.test.ts

Lines changed: 0 additions & 45 deletions
This file was deleted.

0 commit comments

Comments
 (0)
0