Skip to content

Commit 577fbf4

Browse files
authored
Merge pull request #7837 from getsentry/prepare-release/7.48.0
meta: Update CHANGELOG for 7.48.0
2 parents 88d94af + a4bb082 commit 577fbf4

File tree

175 files changed

+2723
-1336
lines changed

Some content is hidden

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

175 files changed

+2723
-1336
lines changed

.github/workflows/build.yml

Lines changed: 44 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,9 @@ jobs:
161161
with:
162162
ref: ${{ env.HEAD_COMMIT }}
163163
- name: Set up Node
164-
uses: volta-cli/action@v4
164+
uses: actions/setup-node@v3
165+
with:
166+
node-version-file: 'package.json'
165167
# we use a hash of yarn.lock as our cache key, because if it hasn't changed, our dependencies haven't changed,
166168
# so no need to reinstall them
167169
- name: Compute dependency cache key
@@ -207,8 +209,9 @@ jobs:
207209
with:
208210
ref: ${{ env.HEAD_COMMIT }}
209211
- name: Set up Node
210-
uses: volta-cli/action@v4
211-
212+
uses: actions/setup-node@v3
213+
with:
214+
node-version-file: 'package.json'
212215
- name: Check dependency cache
213216
uses: actions/cache/restore@v3
214217
with:
@@ -262,7 +265,9 @@ jobs:
262265
with:
263266
ref: ${{ env.HEAD_COMMIT }}
264267
- name: Set up Node
265-
uses: volta-cli/action@v4
268+
uses: actions/setup-node@v3
269+
with:
270+
node-version-file: 'package.json'
266271
- name: Restore caches
267272
uses: ./.github/actions/restore-cache
268273
env:
@@ -331,7 +336,9 @@ jobs:
331336
with:
332337
ref: ${{ env.HEAD_COMMIT }}
333338
- name: Set up Node
334-
uses: volta-cli/action@v4
339+
uses: actions/setup-node@v3
340+
with:
341+
node-version-file: 'package.json'
335342
- name: Restore caches
336343
uses: ./.github/actions/restore-cache
337344
env:
@@ -352,7 +359,9 @@ jobs:
352359
with:
353360
ref: ${{ env.HEAD_COMMIT }}
354361
- name: Set up Node
355-
uses: volta-cli/action@v4
362+
uses: actions/setup-node@v3
363+
with:
364+
node-version-file: 'package.json'
356365
- name: Restore caches
357366
uses: ./.github/actions/restore-cache
358367
env:
@@ -372,7 +381,9 @@ jobs:
372381
with:
373382
ref: ${{ env.HEAD_COMMIT }}
374383
- name: Set up Node
375-
uses: volta-cli/action@v4
384+
uses: actions/setup-node@v3
385+
with:
386+
node-version-file: 'package.json'
376387
- name: Restore caches
377388
uses: ./.github/actions/restore-cache
378389
env:
@@ -526,7 +537,9 @@ jobs:
526537
with:
527538
ref: ${{ env.HEAD_COMMIT }}
528539
- name: Set up Node
529-
uses: volta-cli/action@v4
540+
uses: actions/setup-node@v3
541+
with:
542+
node-version-file: 'package.json'
530543
- name: Restore caches
531544
uses: ./.github/actions/restore-cache
532545
env:
@@ -570,6 +583,7 @@ jobs:
570583
bundle:
571584
- loader_base
572585
- loader_eager
586+
- loader_debug
573587
- loader_tracing
574588
- loader_replay
575589
- loader_tracing_replay
@@ -580,7 +594,9 @@ jobs:
580594
with:
581595
ref: ${{ env.HEAD_COMMIT }}
582596
- name: Set up Node
583-
uses: volta-cli/action@v4
597+
uses: actions/setup-node@v3
598+
with:
599+
node-version-file: 'package.json'
584600
- name: Restore caches
585601
uses: ./.github/actions/restore-cache
586602
env:
@@ -631,7 +647,9 @@ jobs:
631647
with:
632648
ref: ${{ env.HEAD_COMMIT }}
633649
- name: Set up Node
634-
uses: volta-cli/action@v4
650+
uses: actions/setup-node@v3
651+
with:
652+
node-version-file: 'package.json'
635653
- name: Restore caches
636654
uses: ./.github/actions/restore-cache
637655
env:
@@ -655,7 +673,9 @@ jobs:
655673
with:
656674
ref: ${{ env.HEAD_COMMIT }}
657675
- name: Set up Node
658-
uses: volta-cli/action@v4
676+
uses: actions/setup-node@v3
677+
with:
678+
node-version-file: 'package.json'
659679
- name: Restore caches
660680
uses: ./.github/actions/restore-cache
661681
env:
@@ -730,7 +750,7 @@ jobs:
730750
yarn test:integration:ci
731751
732752
job_e2e_tests:
733-
name: E2E Tests
753+
name: E2E Tests (Shard ${{ matrix.shard }})
734754
# 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
735755
# Dependabot PRs sadly also don't have access to secrets, so we skip them as well
736756
if:
@@ -739,13 +759,19 @@ jobs:
739759
needs: [job_get_metadata, job_build]
740760
runs-on: ubuntu-20.04
741761
timeout-minutes: 20
762+
strategy:
763+
fail-fast: false
764+
matrix:
765+
shard: [1, 2, 3]
742766
steps:
743767
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
744768
uses: actions/checkout@v3
745769
with:
746770
ref: ${{ env.HEAD_COMMIT }}
747771
- name: Set up Node
748-
uses: volta-cli/action@v4
772+
uses: actions/setup-node@v3
773+
with:
774+
node-version-file: 'package.json'
749775
- name: Restore caches
750776
uses: ./.github/actions/restore-cache
751777
env:
@@ -761,6 +787,8 @@ jobs:
761787
E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
762788
E2E_TEST_SENTRY_ORG_SLUG: 'sentry-javascript-sdks'
763789
E2E_TEST_SENTRY_TEST_PROJECT: 'sentry-javascript-e2e-tests'
790+
E2E_TEST_SHARD: ${{ matrix.shard }}
791+
E2E_TEST_SHARD_AMOUNT: 3
764792
run: |
765793
cd packages/e2e-tests
766794
yarn test:e2e
@@ -803,7 +831,9 @@ jobs:
803831
with:
804832
ref: ${{ env.HEAD_COMMIT }}
805833
- name: Set up Node
806-
uses: volta-cli/action@v4
834+
uses: actions/setup-node@v3
835+
with:
836+
node-version-file: 'package.json'
807837
- name: Restore caches
808838
uses: ./.github/actions/restore-cache
809839
env:

.github/workflows/canary.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,16 @@ jobs:
2020
job_canary_test:
2121
name: Canary Tests
2222
runs-on: ubuntu-20.04
23-
timeout-minutes: 30
23+
timeout-minutes: 60
2424
steps:
2525
- name: 'Check out current commit'
2626
uses: actions/checkout@v3
2727
with:
2828
ref: ${{ env.HEAD_COMMIT }}
2929
- name: Set up Node
30-
uses: volta-cli/action@v4
30+
uses: actions/setup-node@v3
31+
with:
32+
node-version-file: 'package.json'
3133
- name: Install dependencies
3234
run: yarn install --ignore-engines --frozen-lockfile
3335
- name: Build packages
@@ -70,8 +72,9 @@ jobs:
7072
with:
7173
ref: ${{ env.HEAD_COMMIT }}
7274
- name: Set up Node
73-
uses: volta-cli/action@v4
74-
75+
uses: actions/setup-node@v3
76+
with:
77+
node-version-file: 'package.json'
7578
- name: Install dependencies
7679
run: yarn install --ignore-engines --frozen-lockfile
7780

.github/workflows/flaky-test-detector.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@ jobs:
3232
- name: Check out current branch
3333
uses: actions/checkout@v3
3434
- name: Set up Node
35-
uses: volta-cli/action@v4
36-
35+
uses: actions/setup-node@v3
36+
with:
37+
node-version-file: 'package.json'
3738
- name: Install dependencies
3839
run: yarn install --ignore-engines --frozen-lockfile
3940

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
*.md
22
.nxcache
3+
packages/browser-integration-tests/fixtures

CHANGELOG.md

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

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

7+
## 7.48.0
8+
9+
### Important Changes
10+
11+
12+
- **feat(node): Add `AsyncLocalStorage` implementation of `AsyncContextStrategy` (#7800)**
13+
- feat(core): Extend `AsyncContextStrategy` to allow reuse of existing context (#7778)
14+
- feat(core): Make `runWithAsyncContext` public API (#7817)
15+
- feat(core): Add async context abstraction (#7753)
16+
- feat(node): Adds `domain` implementation of `AsyncContextStrategy` (#7767)
17+
- feat(node): Auto-select best `AsyncContextStrategy` for Node.js version (#7804)
18+
- feat(node): Migrate to domains used through `AsyncContextStrategy` (#7779)
19+
20+
This release switches the SDK to use [`AsyncLocalStorage`](https://nodejs.org/api/async_context.html#class-asynclocalstorage) as the async context isolation mechanism in the SDK for Node 14+. For Node 10 - 13, we continue to use the Node [`domain`](https://nodejs.org/api/domain.html) standard library, since `AsyncLocalStorage` is not supported there. **Preliminary testing showed [a 30% improvement in latency and rps](https://github.com/getsentry/sentry-javascript/issues/7691#issuecomment-1504009089) when making the switch from domains to `AsyncLocalStorage` on Node 16.**
21+
22+
If you want to manually add async context isolation to your application, you can use the new `runWithAsyncContext` API.
23+
24+
```js
25+
const requestHandler = (ctx, next) => {
26+
return new Promise((resolve, reject) => {
27+
Sentry.runWithAsyncContext(
28+
async hub => {
29+
hub.configureScope(scope =>
30+
scope.addEventProcessor(event =>
31+
Sentry.addRequestDataToEvent(event, ctx.request, {
32+
include: {
33+
user: false,
34+
},
35+
})
36+
)
37+
);
38+
39+
await next();
40+
resolve();
41+
},
42+
{ emitters: [ctx] }
43+
);
44+
});
45+
};
46+
```
47+
48+
If you're manually using domains to isolate Sentry data, we strongly recommend switching to this API!
49+
50+
In addition to exporting `runWithAsyncContext` publicly, the SDK also uses it internally where we previously used domains.
51+
52+
- **feat(sveltekit): Remove `withSentryViteConfig` (#7789)**
53+
- feat(sveltekit): Remove SDK initialization via dedicated files (#7791)
54+
55+
This release removes our `withSentryViteConfig` wrapper we previously instructed you to add to your `vite.config.js` file. It is replaced Vite plugins which you simply add to your Vite config, just like the `sveltekit()` Vite plugins. We believe this is a more transparent and Vite/SvelteKit-native way of applying build time modifications. Here's how to use the plugins:
56+
57+
```js
58+
// vite.config.js
59+
import { sveltekit } from '@sveltejs/kit/vite';
60+
import { sentrySvelteKit } from '@sentry/sveltekit';
61+
62+
export default {
63+
plugins: [sentrySvelteKit(), sveltekit()],
64+
// ... rest of your Vite config
65+
};
66+
```
67+
68+
Take a look at the [`README`](https://github.com/getsentry/sentry-javascript/blob/develop/packages/sveltekit/README.md) for updated instructions!
69+
70+
Furthermore, with this transition, we removed the possibility to intialize the SDK in dedicated `sentry.(client|server).config.js` files. Please use SvelteKit's [hooks files](https://github.com/getsentry/sentry-javascript/blob/develop/packages/sveltekit/README.md#2-client-side-setup) to initialize the SDK.
71+
72+
Please note that these are **breaking changes**! We're sorry for the inconvenience but the SvelteKit SDK is still in alpha stage and we want to establish a clean and SvelteKit-friendly API before making the SDK stable. You have been [warned](https://github.com/getsentry/sentry-javascript/blob/eb921275f9c572e72c2348a91cb39fcbb8275b8d/packages/sveltekit/README.md#L20-L24) ;)
73+
74+
- **feat(sveltekit): Add Sentry Vite Plugin to upload source maps (#7811)**
75+
76+
This release adds automatic upload of source maps to the SvelteKit SDK. No need to configure anything other than adding our Vite plugins to your SDK. The example above shows you how to do this.
77+
78+
Please make sure to follow the [`README`](https://github.com/getsentry/sentry-javascript/blob/develop/packages/sveltekit/README.md#uploading-source-maps) to specify your Sentry auth token, as well as org and project slugs.
79+
80+
### Additional Features and Fixes
81+
82+
- feat(browser): Export request instrumentation options (#7818)
83+
- feat(core): Add async context abstraction (#7753)
84+
- feat(core): Add DSC to all outgoing envelopes (#7820)
85+
- feat(node): Add checkin envelope types (#7777)
86+
- feat(replay): Add `getReplayId()` method (#7822)
87+
- fix(browser): Adjust `BrowserTransportOptions` to support offline transport options (#7775)
88+
- fix(browser): DOMException SecurityError stacktrace parsing bug (#7821)
89+
- fix(core): Log warning when tracing extensions are missing (#7601)
90+
- fix(core): Only call `applyDebugMetadata` for error events (#7824)
91+
- fix(integrations): Ensure httpclient integration works with Request (#7786)
92+
- fix(node): `reuseExisting` does not need to call bind on domain (#7780)
93+
- fix(node): Fix domain scope inheritance (#7799)
94+
- fix(node): Make `trpcMiddleware` factory synchronous (#7802)
95+
- fix(serverless): Account when transaction undefined (#7829)
96+
- fix(utils): Make xhr instrumentation independent of parallel running SDK versions (#7836)
97+
798
## 7.47.0
899

9100
### Important Changes

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
"mocha": "^6.1.4",
103103
"nodemon": "^2.0.16",
104104
"npm-run-all": "^4.1.5",
105-
"prettier": "2.7.1",
105+
"prettier": "2.8.7",
106106
"recast": "^0.20.5",
107107
"replace-in-file": "^4.0.0",
108108
"rimraf": "^3.0.2",

packages/browser-integration-tests/.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ module.exports = {
1010
'loader-suites/**/dist/*',
1111
'loader-suites/**/subject.js',
1212
'scripts/**',
13+
'fixtures/**',
1314
],
1415
parserOptions: {
1516
sourceType: 'module',

0 commit comments

Comments
 (0)