Skip to content

Commit 177e5d1

Browse files
authored
Merge pull request #14639 from getsentry/prepare-release/8.43.0
meta(changelog): Update changelog for 8.43.0
2 parents 6331d7c + 5be252c commit 177e5d1

File tree

377 files changed

+8956
-1344
lines changed

Some content is hidden

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

377 files changed

+8956
-1344
lines changed

.craft.yml

+18
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,24 @@ targets:
157157
- nodejs20.x
158158
license: MIT
159159

160+
# NOTE: We publish the v8 layer under its own name so people on v8 can still get patches
161+
# whenever we release a new v8 version—otherwise we would overwrite the current major lambda layer.
162+
163+
# AWS Lambda Layer target
164+
- name: aws-lambda-layer
165+
includeNames: /^sentry-node-serverless-\d+.\d+.\d+(-(beta|alpha|rc)\.\d+)?\.zip$/
166+
layerName: SentryNodeServerlessSDKv8
167+
compatibleRuntimes:
168+
- name: node
169+
versions:
170+
- nodejs10.x
171+
- nodejs12.x
172+
- nodejs14.x
173+
- nodejs16.x
174+
- nodejs18.x
175+
- nodejs20.x
176+
license: MIT
177+
160178
# CDN Bundle Target
161179
- name: gcs
162180
id: 'browser-cdn-bundles'

.github/actions/install-playwright/action.yml

+7
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ inputs:
44
browsers:
55
description: 'What browsers to install.'
66
default: 'chromium webkit firefox'
7+
cwd:
8+
description: 'The working directory to run Playwright in.'
9+
default: '.'
710

811
runs:
912
using: "composite"
@@ -12,6 +15,8 @@ runs:
1215
id: playwright-version
1316
run: echo "version=$(node -p "require('@playwright/test/package.json').version")" >> $GITHUB_OUTPUT
1417
shell: bash
18+
working-directory: ${{ inputs.cwd }}
19+
1520

1621
- name: Restore cached playwright binaries
1722
uses: actions/cache/restore@v4
@@ -26,11 +31,13 @@ runs:
2631
run: npx playwright install chromium webkit firefox --with-deps
2732
if: steps.playwright-cache.outputs.cache-hit != 'true'
2833
shell: bash
34+
working-directory: ${{ inputs.cwd }}
2935

3036
- name: Install Playwright system dependencies only (cached)
3137
run: npx playwright install-deps ${{ inputs.browsers || 'chromium webkit firefox' }}
3238
if: steps.playwright-cache.outputs.cache-hit == 'true'
3339
shell: bash
40+
working-directory: ${{ inputs.cwd }}
3441

3542
# Only store cache on develop branch
3643
- name: Store cached playwright binaries

.github/workflows/build.yml

+17-15
Original file line numberDiff line numberDiff line change
@@ -920,11 +920,6 @@ jobs:
920920
if: steps.restore-tarball-cache.outputs.cache-hit != 'true'
921921
run: yarn build:tarball
922922

923-
- name: Install Playwright
924-
uses: ./.github/actions/install-playwright
925-
with:
926-
browsers: chromium
927-
928923
- name: Get node version
929924
id: versions
930925
run: |
@@ -945,6 +940,12 @@ jobs:
945940
timeout-minutes: 7
946941
run: pnpm ${{ matrix.build-command || 'test:build' }}
947942

943+
- name: Install Playwright
944+
uses: ./.github/actions/install-playwright
945+
with:
946+
browsers: chromium
947+
cwd: dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}
948+
948949
- name: Run E2E test
949950
working-directory: dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}
950951
timeout-minutes: 10
@@ -984,7 +985,7 @@ jobs:
984985

985986
# - We skip optional tests on release branches
986987
job_optional_e2e_tests:
987-
name: E2E ${{ matrix.label || matrix.test-application }} Test
988+
name: E2E ${{ matrix.label || matrix.test-application }} Test (optional)
988989
# 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
989990
# We need to add the `always()` check here because the previous step has this as well :(
990991
# See: https://github.com/actions/runner/issues/2205
@@ -1039,11 +1040,6 @@ jobs:
10391040
if: steps.restore-tarball-cache.outputs.cache-hit != 'true'
10401041
run: yarn build:tarball
10411042

1042-
- name: Install Playwright
1043-
uses: ./.github/actions/install-playwright
1044-
with:
1045-
browsers: chromium
1046-
10471043
- name: Get node version
10481044
id: versions
10491045
run: |
@@ -1064,6 +1060,12 @@ jobs:
10641060
timeout-minutes: 7
10651061
run: pnpm ${{ matrix.build-command || 'test:build' }}
10661062

1063+
- name: Install Playwright
1064+
uses: ./.github/actions/install-playwright
1065+
with:
1066+
browsers: chromium
1067+
cwd: dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}
1068+
10671069
- name: Run E2E test
10681070
working-directory: dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}
10691071
timeout-minutes: 10
@@ -1408,6 +1410,10 @@ jobs:
14081410
key: ${{ needs.job_build.outputs.dependency_cache_key }}
14091411
enableCrossOsArchive: true
14101412

1413+
- name: Increase yarn network timeout on Windows
1414+
if: contains(matrix.os, 'windows')
1415+
run: yarn config set network-timeout 600000 -g
1416+
14111417
- name: Install dependencies
14121418
env:
14131419
SKIP_PLAYWRIGHT_BROWSER_INSTALL: "1"
@@ -1418,10 +1424,6 @@ jobs:
14181424
run: |
14191425
git config --global --add safe.directory "*"
14201426
1421-
- name: Increase yarn network timeout on Windows
1422-
if: contains(matrix.os, 'windows')
1423-
run: yarn config set network-timeout 600000 -g
1424-
14251427
- name: Setup python
14261428
uses: actions/setup-python@v5
14271429
if: ${{ !contains(matrix.container, 'alpine') }}

.github/workflows/issue-package-label.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,12 @@ jobs:
8383
"@sentry.solid": {
8484
"label": "Package: solidstart"
8585
},
86-
"@sentry.svelte": {
87-
"label": "Package: svelte"
88-
},
8986
"@sentry.sveltekit": {
9087
"label": "Package: sveltekit"
9188
},
89+
"@sentry.svelte": {
90+
"label": "Package: svelte"
91+
},
9292
"@sentry.vue": {
9393
"label": "Package: vue"
9494
},

.size-limit.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -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: '79 KB',
82+
limit: '80 KB',
8383
},
8484
{
8585
name: '@sentry/browser (incl. Tracing, Replay, Feedback)',
@@ -166,7 +166,7 @@ module.exports = [
166166
name: 'CDN Bundle (incl. Tracing, Replay)',
167167
path: createCDNPath('bundle.tracing.replay.min.js'),
168168
gzip: true,
169-
limit: '74 KB',
169+
limit: '80 KB',
170170
},
171171
{
172172
name: 'CDN Bundle (incl. Tracing, Replay, Feedback)',
@@ -194,7 +194,7 @@ module.exports = [
194194
path: createCDNPath('bundle.tracing.replay.min.js'),
195195
gzip: false,
196196
brotli: false,
197-
limit: '230 KB',
197+
limit: '240 KB',
198198
},
199199
{
200200
name: 'CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed',
@@ -228,7 +228,7 @@ module.exports = [
228228
import: createImport('init'),
229229
ignore: [...builtinModules, ...nodePrefixedBuiltinModules],
230230
gzip: true,
231-
limit: '140 KB',
231+
limit: '170 KB',
232232
},
233233
{
234234
name: '@sentry/node - without tracing',
@@ -260,7 +260,7 @@ module.exports = [
260260
import: createImport('init'),
261261
ignore: [...builtinModules, ...nodePrefixedBuiltinModules],
262262
gzip: true,
263-
limit: '130 KB',
263+
limit: '135 KB',
264264
},
265265
];
266266

CHANGELOG.md

+109
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,115 @@
1010

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

13+
## 8.43.0
14+
15+
### Important Changes
16+
17+
- **feat(nuxt): Add option autoInjectServerSentry (no default import()) ([#14553](https://github.com/getsentry/sentry-javascript/pull/14553))**
18+
19+
Using the dynamic `import()` as the default behavior for initializing the SDK on the server-side did not work for every project.
20+
The default behavior of the SDK has been changed, and you now need to **use the `--import` flag to initialize Sentry on the server-side** to leverage full functionality.
21+
22+
Example with `--import`:
23+
24+
```bash
25+
node --import ./.output/server/sentry.server.config.mjs .output/server/index.mjs
26+
```
27+
28+
In case you are not able to use the `--import` flag, you can enable auto-injecting Sentry in the `nuxt.config.ts` (comes with limitations):
29+
30+
```ts
31+
sentry: {
32+
autoInjectServerSentry: 'top-level-import', // or 'experimental_dynamic-import'
33+
},
34+
```
35+
36+
- **feat(browser): Adds LaunchDarkly and OpenFeature integrations ([#14207](https://github.com/getsentry/sentry-javascript/pull/14207))**
37+
38+
Adds browser SDK integrations for tracking feature flag evaluations through the LaunchDarkly JS SDK and OpenFeature Web SDK:
39+
40+
```ts
41+
import * as Sentry from '@sentry/browser';
42+
43+
Sentry.init({
44+
integrations: [
45+
// Track LaunchDarkly feature flags
46+
Sentry.launchDarklyIntegration(),
47+
// Track OpenFeature feature flags
48+
Sentry.openFeatureIntegration(),
49+
],
50+
});
51+
```
52+
53+
- Read more about the [Feature Flags](https://develop.sentry.dev/sdk/expected-features/#feature-flags) feature in Sentry.
54+
- Read more about the [LaunchDarkly SDK Integration](https://docs.sentry.io/platforms/javascript/configuration/integrations/launchdarkly/).
55+
- Read more about the [OpenFeature SDK Integration](https://docs.sentry.io/platforms/javascript/configuration/integrations/openfeature/).
56+
57+
- **feat(browser): Add `featureFlagsIntegration` for custom tracking of flag evaluations ([#14582](https://github.com/getsentry/sentry-javascript/pull/14582))**
58+
59+
Adds a browser integration to manually track feature flags with an API. Feature flags are attached to subsequent error events:
60+
61+
```ts
62+
import * as Sentry from '@sentry/browser';
63+
64+
const featureFlagsIntegrationInstance = Sentry.featureFlagsIntegration();
65+
66+
Sentry.init({
67+
// Initialize the SDK with the feature flag integration
68+
integrations: [featureFlagsIntegrationInstance],
69+
});
70+
71+
// Manually track a feature flag
72+
featureFlagsIntegrationInstance.addFeatureFlag('my-feature', true);
73+
```
74+
75+
- **feat(astro): Add Astro 5 support ([#14613](https://github.com/getsentry/sentry-javascript/pull/14613))**
76+
77+
With this release, the Sentry Astro SDK officially supports Astro 5.
78+
79+
### Deprecations
80+
81+
- feat(nextjs): Deprecate typedef for `hideSourceMaps` ([#14594](https://github.com/getsentry/sentry-javascript/pull/14594))
82+
83+
The functionality of `hideSourceMaps` was removed in version 8 but was forgotten to be deprecated and removed.
84+
It will be completely removed in the next major version.
85+
86+
- feat(core): Deprecate APIs around `RequestSession`s ([#14566](https://github.com/getsentry/sentry-javascript/pull/14566))
87+
88+
The APIs around `RequestSession`s are mostly used internally.
89+
Going forward the SDK will not expose concepts around `RequestSession`s.
90+
Instead, functionality around server-side [Release Health](https://docs.sentry.io/product/releases/health/) will be managed in integrations.
91+
92+
### Other Changes
93+
94+
- feat(browser): Add `browserSessionIntegration` ([#14551](https://github.com/getsentry/sentry-javascript/pull/14551))
95+
- feat(core): Add `raw_security` envelope types ([#14562](https://github.com/getsentry/sentry-javascript/pull/14562))
96+
- feat(deps): Bump @opentelemetry/instrumentation from 0.55.0 to 0.56.0 ([#14625](https://github.com/getsentry/sentry-javascript/pull/14625))
97+
- feat(deps): Bump @sentry/cli from 2.38.2 to 2.39.1 ([#14626](https://github.com/getsentry/sentry-javascript/pull/14626))
98+
- feat(deps): Bump @sentry/rollup-plugin from 2.22.6 to 2.22.7 ([#14622](https://github.com/getsentry/sentry-javascript/pull/14622))
99+
- feat(deps): Bump @sentry/webpack-plugin from 2.22.6 to 2.22.7 ([#14623](https://github.com/getsentry/sentry-javascript/pull/14623))
100+
- feat(nestjs): Add fastify support ([#14549](https://github.com/getsentry/sentry-javascript/pull/14549))
101+
- feat(node): Add @vercel/ai instrumentation ([#13892](https://github.com/getsentry/sentry-javascript/pull/13892))
102+
- feat(node): Add `disableAnrDetectionForCallback` function ([#14359](https://github.com/getsentry/sentry-javascript/pull/14359))
103+
- feat(node): Add `trackIncomingRequestsAsSessions` option to http integration ([#14567](https://github.com/getsentry/sentry-javascript/pull/14567))
104+
- feat(nuxt): Add option `autoInjectServerSentry` (no default `import()`) ([#14553](https://github.com/getsentry/sentry-javascript/pull/14553))
105+
- feat(nuxt): Add warning when Netlify or Vercel build is discovered ([#13868](https://github.com/getsentry/sentry-javascript/pull/13868))
106+
- feat(nuxt): Improve serverless event flushing and scope isolation ([#14605](https://github.com/getsentry/sentry-javascript/pull/14605))
107+
- feat(opentelemetry): Stop looking at propagation context for span creation ([#14481](https://github.com/getsentry/sentry-javascript/pull/14481))
108+
- feat(opentelemetry): Update OpenTelemetry dependencies to `^1.29.0` ([#14590](https://github.com/getsentry/sentry-javascript/pull/14590))
109+
- feat(opentelemetry): Update OpenTelemetry dependencies to `1.28.0` ([#14547](https://github.com/getsentry/sentry-javascript/pull/14547))
110+
- feat(replay): Upgrade rrweb packages to 2.30.0 ([#14597](https://github.com/getsentry/sentry-javascript/pull/14597))
111+
- fix(core): Decode `filename` and `module` stack frame properties in Node stack parser ([#14544](https://github.com/getsentry/sentry-javascript/pull/14544))
112+
- fix(core): Filter out unactionable CEFSharp promise rejection error by default ([#14595](https://github.com/getsentry/sentry-javascript/pull/14595))
113+
- fix(nextjs): Don't show warning about devtool option ([#14552](https://github.com/getsentry/sentry-javascript/pull/14552))
114+
- fix(nextjs): Only apply tracing metadata to data fetcher data when data is an object ([#14575](https://github.com/getsentry/sentry-javascript/pull/14575))
115+
- fix(node): Guard against invalid `maxSpanWaitDuration` values ([#14632](https://github.com/getsentry/sentry-javascript/pull/14632))
116+
- fix(react): Match routes with `parseSearch` option in TanStack Router instrumentation ([#14328](https://github.com/getsentry/sentry-javascript/pull/14328))
117+
- fix(sveltekit): Fix git SHA not being picked up for release ([#14540](https://github.com/getsentry/sentry-javascript/pull/14540))
118+
- fix(types): Fix generic exports with default ([#14576](https://github.com/getsentry/sentry-javascript/pull/14576))
119+
120+
Work in this release was contributed by @lsmurray. Thank you for your contribution!
121+
13122
## 8.42.0
14123

15124
### Important Changes

dev-packages/browser-integration-tests/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"dependencies": {
4343
"@babel/preset-typescript": "^7.16.7",
4444
"@playwright/test": "^1.44.1",
45-
"@sentry-internal/rrweb": "2.29.0",
45+
"@sentry-internal/rrweb": "2.30.0",
4646
"@sentry/browser": "8.42.0",
4747
"axios": "1.7.7",
4848
"babel-loader": "^8.2.2",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import { expect } from '@playwright/test';
2+
3+
import { sentryTest } from '../../../../../utils/fixtures';
4+
5+
import { envelopeRequestParser, shouldSkipFeatureFlagsTest, waitForErrorRequest } from '../../../../../utils/helpers';
6+
7+
const FLAG_BUFFER_SIZE = 100; // Corresponds to constant in featureFlags.ts, in browser utils.
8+
9+
sentryTest('Basic test with eviction, update, and no async tasks', async ({ getLocalTestUrl, page }) => {
10+
if (shouldSkipFeatureFlagsTest()) {
11+
sentryTest.skip();
12+
}
13+
14+
await page.route('https://dsn.ingest.sentry.io/**/*', route => {
15+
return route.fulfill({
16+
status: 200,
17+
contentType: 'application/json',
18+
body: JSON.stringify({ id: 'test-id' }),
19+
});
20+
});
21+
22+
const url = await getLocalTestUrl({ testDir: __dirname, skipDsnRouteHandler: true });
23+
await page.goto(url);
24+
25+
await page.evaluate(bufferSize => {
26+
const flagsIntegration = (window as any).Sentry.getClient().getIntegrationByName('FeatureFlags');
27+
for (let i = 1; i <= bufferSize; i++) {
28+
flagsIntegration.addFeatureFlag(`feat${i}`, false);
29+
}
30+
flagsIntegration.addFeatureFlag(`feat${bufferSize + 1}`, true); // eviction
31+
flagsIntegration.addFeatureFlag('feat3', true); // update
32+
return true;
33+
}, FLAG_BUFFER_SIZE);
34+
35+
const reqPromise = waitForErrorRequest(page);
36+
await page.locator('#error').click(); // trigger error
37+
const req = await reqPromise;
38+
const event = envelopeRequestParser(req);
39+
40+
const expectedFlags = [{ flag: 'feat2', result: false }];
41+
for (let i = 4; i <= FLAG_BUFFER_SIZE; i++) {
42+
expectedFlags.push({ flag: `feat${i}`, result: false });
43+
}
44+
expectedFlags.push({ flag: `feat${FLAG_BUFFER_SIZE + 1}`, result: true });
45+
expectedFlags.push({ flag: 'feat3', result: true });
46+
47+
expect(event.contexts?.flags?.values).toEqual(expectedFlags);
48+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import * as Sentry from '@sentry/browser';
2+
3+
window.Sentry = Sentry;
4+
5+
// Not using this as we want to test the getIntegrationByName() approach
6+
// window.sentryFeatureFlagsIntegration = Sentry.featureFlagsIntegration();
7+
8+
Sentry.init({
9+
dsn: 'https://[email protected]/1337',
10+
sampleRate: 1.0,
11+
integrations: [Sentry.featureFlagsIntegration()],
12+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
document.getElementById('error').addEventListener('click', () => {
2+
throw new Error('Button triggered error');
3+
});

0 commit comments

Comments
 (0)