8000 Merge pull request #11770 from getsentry/prepare-release/8.0.0-beta.4 · heshen/sentry-javascript@d97974e · GitHub
[go: up one dir, main page]

Skip to content

Commit d97974e

Browse files
authored
Merge pull request getsentry#11770 from getsentry/prepare-release/8.0.0-beta.4
2 parents 7d5a375 + 25fcba0 commit d97974e

File tree

196 files changed

+3846
-6594
lines changed

Some content is hidden

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

196 files changed

+3846
-6594
lines changed

.github/workflows/auto-release.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,27 @@ jobs:
2020

2121
# https://github.com/actions-ecosystem/action-regex-match
2222
- uses: actions-ecosystem/action-regex-match@v2
23-
id: version
23+
id: version-regex
2424
with:
2525
# Parse version from head branch
2626
text: ${{ github.head_ref }}
2727
# match: preprare-release/xx.xx.xx
2828
regex: '^prepare-release\/(\d+\.\d+\.\d+)(?:-(alpha|beta)\.\d+)?$'
2929

30+
- name: Extract version
31+
id: get_version
32+
run: |
33+
version=${{ steps.version-regex.outputs.match }}
34+
version=${version/'prepare-release/'/''}
35+
echo "version=$version" >> $GITHUB_OUTPUT
36+
3037
- name: Prepare release
3138
uses: getsentry/action-prepare-release@v1
32-
if: github.event.pull_request.merged == true && steps.version.outputs.match != ''
39+
if: github.event.pull_request.merged == true && steps.version-regex.outputs.match != '' && steps.get_version.outputs.version != ''
3340
env:
3441
GITHUB_TOKEN: ${{ secrets.GH_RELEASE_PAT }}
3542
with:
36-
version: ${{ steps.version.outputs.group1 }}
43+
version: ${{ steps.get_version.outputs.version }}
3744
force: false
3845
merge_target: master
3946
craft_config_from_merge_target: true

.github/workflows/build.yml

Lines changed: 4 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -768,40 +768,6 @@ jobs:
768768
name: playwright-traces
769769
path: dev-packages/browser-integration-tests/test-results
770770

771-
job_browser_integration_tests:
772-
name: Browser (${{ matrix.browser }}) Tests
773-
needs: [job_get_metadata, job_build]
774-
if: needs.job_get_metadata.outputs.changed_browser == 'true' || github.event_name != 'pull_request'
775-
runs-on: ubuntu-20.04
776-
timeout-minutes: 20
777-
strategy:
778-
fail-fast: false
779-
matrix:
780-
browser:
781-
- ChromeHeadless
782-
- FirefoxHeadless
783-
- WebkitHeadless
784-
steps:
785-
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
786-
uses: actions/checkout@v4
787-
with:
788-
ref: ${{ env.HEAD_COMMIT }}
789-
- name: Set up Node
790-
uses: actions/setup-node@v4
791-
with:
792-
node-version-file: 'package.json'
793-
- name: Restore caches
794-
uses: ./.github/actions/restore-cache
795-
env:
796-
DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }}
797-
- name: Run integration tests
798-
env:
799-
KARMA_BROWSER: ${{ matrix.browser }}
800-
run: |
801-
cd packages/browser
802-
[[ $KARMA_BROWSER == WebkitHeadless ]] && yarn run playwright install-deps webkit
803-
yarn test:integration
804-
805771
job_browser_build_tests:
806772
name: Browser Build Tests
807773
needs: [job_get_metadata, job_build]
@@ -942,12 +908,10 @@ jobs:
942908
# We want to run this if:
943909
# - The build job was successful, not skipped
944910
# - AND if the profiling node bindings were either successful or skipped
945-
# AND if this is not a PR from a fork or dependabot
946911
if: |
947912
always() && needs.job_build.result == 'success' &&
948913
(needs.job_compile_bindings_profiling_node.result == 'success' || needs.job_compile_bindings_profiling_node.result == 'skipped') &&
949-
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) &&
950-
github.actor != 'dependabot[bot]'
914+
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
951915
needs: [job_get_metadata, job_build, job_compile_bindings_profiling_node]
952916
runs-on: ubuntu-20.04-large-js
953917
timeout-minutes: 15
@@ -1005,13 +969,11 @@ jobs:
1005969
job_e2e_tests:
1006970
name: E2E ${{ matrix.label || matrix.test-application }} Test
1007971
# 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
1008-
# Dependabot PRs sadly also don't have access to secrets, so we skip them as well
1009972
# We need to add the `always()` check here because the previous step has this as well :(
1010973
# See: https://github.com/actions/runner/issues/2205
1011974
if:
1012975
always() && needs.job_e2e_prepare.result == 'success' &&
1013-
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) &&
1014-
github.actor != 'dependabot[bot]'
976+
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
1015977
needs: [job_get_metadata, job_build, job_e2e_prepare]
1016978
runs-on: ubuntu-20.04
1017979
timeout-minutes: 10
@@ -1141,14 +1103,14 @@ jobs:
11411103
job_profiling_e2e_tests:
11421104
name: E2E ${{ matrix.label || matrix.test-application }} Test
11431105
# 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
1144-
# Dependabot PRs sadly also don't have access to secrets, so we skip them as well
1106+
# Dependabot specifically also has access to secrets
11451107
# We need to add the `always()` check here because the previous step has this as well :(
11461108
# See: https://github.com/actions/runner/issues/2205
11471109
if:
11481110
# Only run profiling e2e tests if profiling node bindings have changed
11491111
always() && needs.job_e2e_prepare.result == 'success' &&
11501112
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) &&
1151-
github.actor != 'dependabot[bot]' && (
1113+
(
11521114
(needs.job_get_metadata.outputs.changed_profiling_node_bindings == 'true') ||
11531115
(needs.job_get_metadata.outputs.is_release == 'true') ||
11541116
(github.event_name != 'pull_request')
@@ -1240,7 +1202,6 @@ jobs:
12401202
job_nextjs_integration_test,
12411203
job_node_integration_tests,
12421204
job_browser_playwright_tests,
1243-
job_browser_integration_tests,
12441205
job_browser_loader_tests,
12451206
job_remix_integration_tests,
12461207
job_e2e_tests,

.size-limit.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -52,35 +52,28 @@ module.exports = [
5252
path: 'packages/browser/build/npm/esm/index.js',
5353
import: createImport('init', 'browserTracingIntegration', 'replayIntegration', 'feedbackIntegration'),
5454
gzip: true,
55-
limit: '83 KB',
55+
limit: '87 KB',
5656
},
5757
{
5858
name: '@sentry/browser (incl. Feedback)',
5959
path: 'packages/browser/build/npm/esm/index.js',
6060
import: createImport('init', 'feedbackIntegration'),
6161
gzip: true,
62-
limit: '37 KB',
63-
},
64-
{
65-
name: '@sentry/browser (incl. Feedback, Feedback Modal)',
66-
path: 'packages/browser/build/npm/esm/index.js',
67-
import: createImport('init', 'feedbackIntegration', 'feedbackModalIntegration'),
68-
gzip: true,
69-
limit: '37 KB',
62+
limit: '40 KB',
7063
},
7164
{
72-
name: '@sentry/browser (incl. Feedback, Feedback Modal, Feedback Screenshot)',
65+
name: '@sentry/browser (incl. sendFeedback)',
7366
path: 'packages/browser/build/npm/esm/index.js',
74-
import: createImport('init', 'feedbackIntegration', 'feedbackModalIntegration', 'feedbackScreenshotIntegration'),
67+
import: createImport('init', 'sendFeedback'),
7568
gzip: true,
76-
limit: '40 KB',
69+
limit: '28 KB',
7770
},
7871
{
79-
name: '@sentry/browser (incl. sendFeedback)',
72+
name: '@sentry/browser (incl. FeedbackAsync)',
8073
path: 'packages/browser/build/npm/esm/index.js',
81-
import: createImport('init', 'sendFeedback'),
74+
import: createImport('init', 'feedbackAsyncIntegration'),
8275
gzip: true,
83-
limit: '30 KB',
76+
limit: '33 KB',
8477
},
8578
// React SDK (ESM)
8679
{
@@ -167,6 +160,13 @@ module.exports = [
167160
brotli: false,
168161
limit: '220 KB',
169162
},
163+
{
164+
name: 'CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed',
165+
path: createCDNPath('bundle.tracing.replay.feedback.min.js'),
166+
gzip: false,
167+
brotli: false,
168+
limit: '264 KB',
169+
},
170170
// Next.js SDK (ESM)
171171
{
172172
name: '@sentry/nextjs (client)',

CHANGELOG.md

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

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

7+
## 8.0.0-beta.4
8+
9+
### Important Changes
10+
11+
- **feat(browser): Add INP support for v8 (#11650)**
12+
13+
INP web vital support was now forward-ported to version 8. Recording of INP data is enabled by default.
14+
15+
- **feat(core): Increase default transport buffer size from 30 to 64 (#11764)**
16+
17+
The default limit of queued events to be sent was increased from 30 to 64 events. You may observe a higher memory
18+
footprint of the SDK. You can override this limit by setting the `transportOptions.bufferSize` option in
19+
`Sentry.init()`.
20+
21+
- **feat(replay): Add "maxCanvasSize" option for replay canvases (#11617)**
22+
23+
A `maxCanvasSize` option was added to the `replayCanvasIntegration` to disallow capturing of canvases larger than a
24+
certain size. This value defaults to `1280` which will not capture canvases bigger than 1280x1280 pixels.
25+
26+
### Other Changes
27+
28+
- deps: Downgrade `@opentelemetry/instrumentation-http` to `0.48.0` (#11745)
29+
- deps(nextjs): Remove unnecessary and faulty `@opentelemetry/api` dependency from Next.js package (#11717)
30+
- feat(aws): Add OTEL based integrations (#11548)
31+
- feat(core): Ensure trace context only includes relevant data (#11713)
32+
- feat(deps): Bump @opentelemetry/instrumentation-fastify from 0.33.0 to 0.35.0 (#11690)
33+
- feat(deps): Bump @opentelemetry/instrumentation-graphql from 0.37.0 to 0.39.0 (#11692)
34+
- feat(deps): Bump @opentelemetry/instrumentation-http from 0.48.0 to 0.50.0 (#11725)
35+
- feat(deps): Bump @opentelemetry/instrumentation-mongoose from 0.35.0 to 0.37.0 (#11693)
36+
- feat(deps): Bump @opentelemetry/instrumentation-mysql2 from 0.35.0 to 0.37.0 (#11726)
37+
- feat(deps): Bump @opentelemetry/instrumentation-nestjs-core from 0.34.0 to 0.36.0 (#11727)
38+
- feat(deps): Bump @opentelemetry/sdk-metrics from 1.21.0 to 1.23.0 (#11695)
39+
- feat(deps): Bump @prisma/instrumentation from 5.9.0 to 5.12.1 (#11724)
40+
- feat(feedback): Create async bundles and code to resolve helper integrations (#11621)
41+
- feat(nextjs): Sample out low-quality spans on older Next.js versions (#11722)
42+
- feat(opentelemetry): Support new http method attribute (#11756)
43+
- feat(opentelemetry): Use rest args for addOpenTelemetryInstrumentation (#11721)
44+
- feat(replay): Upgrade rrweb packages to 2.15.0 (#11736)
45+
- fix(browser): Ensure `lazyLoadIntegration` works in NPM mode (#11673)
46+
- fix(browser): Set custom sentry source correctly (#11735)
47+
- fix(ember): Do not create rendering spans without transaction (#11749)
48+
- fix(serverless): Check if cloud event callback is a function (#9044) (#11701)
49+
- ref(nextjs): Remove unnecessary logic to filter symbolification/sentry spans (#11714)
50+
751
## 8.0.0-beta.3
852

953
### Important Changes

MIGRATION.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -177,12 +177,10 @@ The `Transaction` integration has been removed from `@sentry/integrations`. Ther
177177
#### @sentry/serverless
178178

179179
`@sentry/serverless` has been removed and will no longer be published. The serverless package has been split into two
180-
different packages, `@sentry/aws-serverless` and `@sentry/google-cloud-serverless`. These new packages have smaller
181-
bundle size than `@sentry/serverless`, which should improve your serverless cold-start times.
180+
different packages, `@sentry/aws-serverless` and `@sentry/google-cloud-serverless`.
182181

183-
`@sentry/aws-serverless` and `@sentry/google-cloud-serverless` has also been changed to only emit CJS builds. The ESM
184-
build for the `@sentry/serverless` package was always broken and we decided to remove it entirely. ESM support will be
185-
re-added at a later date.
182+
The `@sentry/google-cloud-serverless` package has also been changed to only emit CJS builds because it can only
183+
instrument CJS. ESM support will be re-added at a later date.
186184

187185
In `@sentry/serverless` you had to use a namespace import to initialize the SDK. This has been removed so that you can
188186
directly import from the SDK instead.
@@ -875,8 +873,9 @@ Sentry.init({
875873

876874
#### Breaking `sentrySvelteKit()` changes
877875

878-
We upgraded the `@sentry/vite-plugin` which is a dependency of the SvelteKit SDK from version 0.x to 2.x. With this
879-
change, resolving uploaded source maps should work out of the box much more often than before
876+
We upgraded the `@sentry/vite-plugin` from version 0.x to 2.x. This package is internally used by the
877+
`@sentry/sveltekit` SDK. With this change, resolving uploaded source maps should work out of the box much more often
878+
than before
880879
([more information](https://docs.sentry.io/platforms/javascript/sourcemaps/troubleshooting_js/artifact-bundles/)).
881880

882881
To allow future upgrades of the Vite plugin without breaking stable and public APIs in `sentrySvelteKit`, we modified
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Sentry.addBreadcrumb({
2+
category: 'auth',
3+
message: 'testing loader',
4+
level: 'error',
5+
});
6+
Sentry.captureMessage('test');
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { expect } from '@playwright/test';
2+
3+
import { sentryTest } from '../../../../utils/fixtures';
4+
import { envelopeRequestParser, waitForErrorRequestOnUrl } from '../../../../utils/helpers';
5+
6+
sentryTest('should add breadcrumb to message', async ({ getLocalTestUrl, page }) => {
7+
const url = await getLocalTestUrl({ testDir: __dirname });
8+
const req = await waitForErrorRequestOnUrl(page, url);
9+
10+
const eventData = envelopeRequestParser(req);
11+
12+
expect(eventData.message).toBe('test');
13+
expect(eventData.breadcrumbs?.length).toBe(1);
14+
expect(eventData.breadcrumbs).toEqual([
15+
{
16+
category: 'auth',
17+
level: 'error',
18+
message: 'testing loader',
19+
timestamp: expect.any(Number),
20+
},
21+
]);
22+
});
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Sentry.onLoad(function () {
2+
Sentry.init({});
3+
Sentry.addBreadcrumb({
4+
category: 'auth',
5+
message: 'testing loader',
6+
level: 'error',
7+
});
8+
});
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Sentry.captureMessage('test');
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { expect } from '@playwright/test';
2+
3+
import { sentryTest } from '../../../../utils/fixtures';
4+
import { envelopeRequestParser, waitForErrorRequestOnUrl } from '../../../../utils/helpers';
5+
6+
sentryTest('should add breadcrumb from onLoad callback to message', async ({ getLocalTestUrl, page }) => {
7+
const url = await getLocalTestUrl({ testDir: __dirname });
8+
const req = await waitForErrorRequestOnUrl(page, url);
9+
10+
const eventData = envelopeRequestParser(req);
11+
12+
expect(eventData.message).toBe('test');
13+
expect(eventData.breadcrumbs?.length).toBe(1);
14+
expect(eventData.breadcrumbs).toEqual([
15+
{
16+
category: 'auth',
17+
level: 'error',
18+
message: 'testing loader',
19+
timestamp: expect.any(Number),
20+
},
21+
]);
22+
});

dev-packages/browser-integration-tests/loader-suites/loader/onLoad/captureException/test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,12 @@ sentryTest('captureException works', async ({ getLocalTestUrl, page }) => {
1111

1212
expect(eventData.message).toBe('Test exception');
1313
});
14+
15+
sentryTest('should set SENTRY_SDK_SOURCE value', async ({ getLocalTestUrl, page }) => {
16+
const url = await getLocalTestUrl({ testDir: __dirname });
17+
const req = await waitForErrorRequestOnUrl(page, url);
18+
19+
const eventData = envelopeRequestParser(req);
20+
21+
expect(eventData.sdk?.packages?.[0].name).toBe('loader:@sentry/browser');
22+
});

dev-packages/browser-integration-tests/loader-suites/loader/onLoad/captureExceptionInOnLoad/test.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,20 @@ sentryTest('captureException works inside of onLoad', async ({ getLocalTestUrl,
1919

2020
expect(eventData.message).toBe('Test exception');
2121
});
22+
23+
sentryTest('should set SENTRY_SDK_SOURCE value', async ({ getLocalTestUrl, page }) => {
24+
await page.route('https://dsn.ingest.sentry.io/**/*', route => {
25+
return route.fulfill({
26+
status: 200,
27+
contentType: 'application/json',
28+
body: JSON.stringify({ id: 'test-id' }),
29+
});
30+
});
31+
32+
const url = await getLocalTestUrl({ testDir: __dirname });
33+
const req = await waitForErrorRequestOnUrl(page, url);
34+
35+
const eventData = envelopeRequestParser(req);
36+
37+
expect(eventData.sdk?.packages?.[0].name).toBe('loader:@sentry/browser');
38+
});
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import * as Sentry from '@sentry/browser';
2+
3+
// So we can use this in subject.js
4+
// We specifically DO NOT set this on window.Sentry as we want to test a non-CDN bundle environment,
5+
// where window.Sentry is usually not available
6+
window._testSentry = { ...Sentry };
7+
8+
Sentry.init({
9+
dsn: 'https://public@dsn.ingest.sentry.io/1337',
10+
integrations: [],
11+
});
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
window._testLazyLoadIntegration = async function run() {
2+
const integration = await window._testSentry.lazyLoadIntegration('httpClientIntegration');
3+
4+
window._testSentry.getClient()?.addIntegration(integration());
5+
6+
window._integrationLoaded = true;
7+
};

0 commit comments

Comments
 (0)
0