Skip to content

Commit a84582c

Browse files
author
Luca Forstner
authored
Merge branch 'develop' into simple-multiplexed-transport
2 parents 5ee9fae + daf2edf commit a84582c

File tree

372 files changed

+6218
-4094
lines changed

Some content is hidden

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

372 files changed

+6218
-4094
lines changed

.craft.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,7 @@ targets:
3232
- name: npm
3333
id: '@sentry-internal/feedback'
3434
includeNames: /^sentry-internal-feedback-\d.*\.tgz$/
35-
## 1.8 Feedback Modal package (browser only)
36-
- name: npm
37-
id: '@sentry-internal/feedback-modal'
38-
includeNames: /^sentry-internal-feedback-modal-\d.*\.tgz$/
39-
## 1.9 Feedback Screenshot package (browser only)
40-
- name: npm
41-
id: '@sentry-internal/feedback-screenshot'
42-
includeNames: /^sentry-internal-feedback-screenshot-\d.*\.tgz$/
43-
## 1.10 ReplayCanvas package (browser only)
35+
## 1.8 ReplayCanvas package (browser only)
4436
- name: npm
4537
id: '@sentry-internal/replay-canvas'
4638
includeNames: /^sentry-internal-replay-canvas-\d.*\.tgz$/

.github/workflows/build.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,6 @@ jobs:
105105
- 'packages/replay/**'
106106
- 'packages/replay-canvas/**'
107107
- 'packages/feedback/**'
108-
- 'packages/feedback-modal/**'
109-
- 'packages/feedback-screenshot/**'
110108
- 'packages/wasm/**'
111109
browser_integration:
112110
- *shared
@@ -413,6 +411,7 @@ jobs:
413411
${{ github.workspace }}/packages/browser/build/bundles/**
414412
${{ github.workspace }}/packages/replay/build/bundles/**
415413
${{ github.workspace }}/packages/replay-canvas/build/bundles/**
414+
${{ github.workspace }}/packages/feedback/build/bundles/**
416415
${{ github.workspace }}/packages/**/*.tgz
417416
${{ github.workspace }}/packages/aws-serverless/build/aws/dist-serverless/*.zip
418417
@@ -623,21 +622,20 @@ jobs:
623622
- bundle
624623
- bundle_min
625624
- bundle_replay
626-
- bundle_replay_min
627625
- bundle_tracing
628-
- bundle_tracing_min
629626
- bundle_tracing_replay
630-
- bundle_tracing_replay_min
627+
- bundle_tracing_replay_feedback
628+
- bundle_tracing_replay_feedback_min
631629
project:
632630
- chromium
633631
include:
634632
# Only check all projects for esm & full bundle
635633
# We also shard the tests as they take the longest
636-
- bundle: bundle_tracing_replay_min
634+
- bundle: bundle_tracing_replay_feedback_min
637635
project: ''
638636
shard: 1
639637
shards: 2
640-
- bundle: bundle_tracing_replay_min
638+
- bundle: bundle_tracing_replay_feedback_min
641639
project: ''
642640
shard: 2
643641
shards: 2
@@ -654,7 +652,7 @@ jobs:
654652
shards: 3
655653
exclude:
656654
# Do not run the default chromium-only tests
657-
- bundle: bundle_tracing_replay_min
655+
- bundle: bundle_tracing_replay_feedback_min
658656
project: 'chromium'
659657
- bundle: esm
660658
project: 'chromium'

.size-limit.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ module.exports = [
7373
path: 'packages/browser/build/npm/esm/index.js',
7474
import: createImport('init', 'feedbackIntegration', 'feedbackModalIntegration', 'feedbackScreenshotIntegration'),
7575
gzip: true,
76-
limit: '37 KB',
76+
limit: '40 KB',
7777
},
7878
{
7979
name: '@sentry/browser (incl. sendFeedback)',
@@ -143,7 +143,7 @@ module.exports = [
143143
name: 'CDN Bundle (incl. Tracing, Replay, Feedback)',
144144
path: createCDNPath('bundle.tracing.replay.feedback.min.js'),
145145
gzip: true,
146-
limit: '83 KB',
146+
limit: '86 KB',
147147
},
148148
// browser CDN bundles (non-gzipped)
149149
{
@@ -208,7 +208,7 @@ module.exports = [
208208
'tls',
209209
],
210210
gzip: true,
211-
limit: '150 KB',
211+
limit: '160 KB',
212212
},
213213
];
214214

CHANGELOG.md

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

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

7+
## 8.0.0-beta.1
8+
9+
This is the first beta release of Sentry JavaScript SDK v8. With this release, there are no more planned breaking
10+
changes for the v8 cycle.
11+
12+
Read the [in-depth migration guide](./MIGRATION.md) to find out how to address any breaking changes in your code. All
13+
deprecations from the v7 cycle, with the exception of `getCurrentHub()`, have been removed and can no longer be used in
14+
v8.
15+
16+
### Version Support
17+
18+
The Sentry JavaScript SDK v8 now supports Node.js 14.8.0 or higher. This applies to `@sentry/node` and all of our
19+
node-based server-side sdks (`@sentry/nextjs`, `@sentry/remix`, etc.).
20+
21+
The browser SDKs now require
22+
[ES2018+](https://caniuse.com/?feats=mdn-javascript_builtins_regexp_dotall,js-regexp-lookbehind,mdn-javascript_builtins_regexp_named_capture_groups,mdn-javascript_builtins_regexp_property_escapes,mdn-javascript_builtins_symbol_asynciterator,mdn-javascript_functions_method_definitions_async_generator_methods,mdn-javascript_grammar_template_literals_template_literal_revision,mdn-javascript_operators_destructuring_rest_in_objects,mdn-javascript_operators_destructuring_rest_in_arrays,promise-finally)
23+
compatible browsers. New minimum browser versions:
24+
25+
- Chrome 63
26+
- Edge 79
27+
- Safari/iOS Safari 12
28+
- Firefox 58
29+
- Opera 50
30+
- Samsung Internet 8.2
31+
32+
For more details, please see the [version support section in migration guide](./MIGRATION.md#1-version-support-changes).
33+
34+
### Package removal
35+
36+
The following packages will no longer be published
37+
38+
- [@sentry/hub](./MIGRATION.md#sentryhub)
39+
- [@sentry/tracing](./MIGRATION.md#sentrytracing)
40+
- [@sentry/integrations](./MIGRATION.md#sentryintegrations)
41+
- [@sentry/serverless](./MIGRATION.md#sentryserverless)
42+
- [@sentry/replay](./MIGRATION.md#sentryreplay)
43+
44+
### Initializing Server-side SDKs (Node, Bun, Next.js, SvelteKit, Astro, Remix):
45+
46+
Initializing the SDKs on the server-side has been simplified. See more details in our migration docs about
47+
[initializing the SDK in v8](./MIGRATION.md/#initializing-the-node-sdk).
48+
49+
### Performance Monitoring Changes
50+
51+
The API around performance monitoring and tracing has been vastly improved, and we've added support for more
52+
integrations out of the box.
53+
54+
- [Performance Monitoring API](./MIGRATION.md#performance-monitoring-api)
55+
- [Performance Monitoring Integrations](./MIGRATION.md#performance-monitoring-integrations)
56+
57+
### Important Changes since v8.0.0-alpha.9
58+
59+
- **feat(browser): Create spans as children of root span by default (#10986)**
60+
61+
Because execution context isolation in browser environments does not work reliably, we deciced to keep a flat span
62+
hierarchy by default in v8.
63+
64+
- **feat(core): Deprecate `addTracingExtensions` (#11579)**
65+
66+
Instead of calling `Sentry.addTracingExtensions()` if you want to use performance in a browser SDK without using
67+
`browserTracingIntegration()`, you should now call `Sentry.registerSpanErrorInstrumentation()`.
68+
69+
- **feat(core): Implement `suppressTracing` (#11468)**
70+
71+
You can use the new `suppressTracing` API to ensure a given callback will not generate any spans:
72+
73+
```js
74+
return Sentry.suppressTracing(() => {
75+
// Ensure this fetch call does not generate a span
76+
return fetch('/my-url');
77+
});
78+
```
79+
80+
- **feat: Rename ESM loader hooks to `import` and `loader` (#11498)**
81+
82+
We renamed the loader hooks for better clarity:
83+
84+
```sh
85+
# For Node.js <= 18.18.2
86+
node --loader=@sentry/node/loader app.js
87+
88+
# For Node.js >= 18.19.0
89+
node --import=@sentry/node/import app.js
90+
```
91+
92+
- **feat(node): Do not exit process by default when other `onUncaughtException` handlers are registered in
93+
`onUncaughtExceptionIntegration` (#11532)**
94+
95+
In v8, we will no longer exit the node process by default if other uncaught exception handlers have been registered by
96+
the user.
97+
98+
- **Better handling of transaction name for errors**
99+
100+
We improved the way we keep the transaction name for error events, even when spans are not sampled or performance is
101+
disabled.
102+
103+
- feat(fastify): Update scope `transactionName` when handling request (#11447)
104+
- feat(hapi): Update scope `transactionName` when handling request (#11448)
105+
- feat(koa): Update scope `transactionName` when creating router span (#11476)
106+
- feat(sveltekit): Update scope transactionName when handling server-side request (#11511)
107+
- feat(nestjs): Update scope transaction name with parameterized route (#11510)
108+
109+
### Removal/Refactoring of deprecated functionality
110+
111+
- feat(core): Remove `getCurrentHub` from `AsyncContextStrategy` (#11581)
112+
- feat(core): Remove `getGlobalHub` export (#11565)
113+
- feat(core): Remove `Hub` class export (#11560)
114+
- feat(core): Remove most Hub class exports (#11536)
115+
- feat(nextjs): Remove webpack 4 support (#11605)
116+
- feat(vercel-edge): Stop using hub (#11539)
117+
118+
### Other Changes
119+
120+
- feat: Hoist `getCurrentHub` shim to core as `getCurrentHubShim` (#11537)
121+
- feat(core): Add default behaviour for `rewriteFramesIntegration` in browser (#11535)
122+
- feat(core): Ensure replay envelopes are sent in order when offline (#11413)
123+
- feat(core): Extract errors from props in unkown inputs (#11526)
124+
- feat(core): Update metric normalization (#11518)
125+
- feat(feedback): Customize feedback placeholder text color (#11417)
126+
- feat(feedback): Maintain v7 compat in the @sentry-internal/feedback package (#11461)
127+
- feat(next): Handle existing root spans for isolation scope (#11479)
128+
- feat(node): Ensure tracing without performance (TWP) works (#11564)
129+
- feat(opentelemetry): Export `getRequestSpanData` (#11508)
130+
- feat(opentelemetry): Remove otel.attributes in context (#11604)
131+
- feat(ratelimit): Add metrics rate limit (#11538)
132+
- feat(remix): Skip span creation for `OPTIONS` and `HEAD` requests. (#11149)
133+
- feat(replay): Merge packages together & ensure bundles are built (#11552)
134+
- feat(tracing): Adds span envelope and datacategory (#11534)
135+
- fix(browser): Ensure pageload trace remains active after pageload span finished (#11600)
136+
- fix(browser): Ensure tracing without performance (TWP) works (#11561)
137+
- fix(nextjs): Fix `tunnelRoute` matching logic for hybrid cloud (#11576)
138+
- fix(nextjs): Remove Http integration from Next.js (#11304)
139+
- fix(node): Ensure isolation scope is correctly cloned for non-recording spans (#11503)
140+
- fix(node): Make fastify types more broad (#11544)
141+
- fix(node): Send ANR events without scope if event loop blocked indefinitely (#11578)
142+
- fix(tracing): Fixes latest route name and source not updating correctly (#11533)
143+
- ref(browser): Move browserTracing into browser pkg (#11484)
144+
- ref(feedback): Configure font size (#11437)
145+
- ref(feedback): Refactor Feedback types into @sentry/types and reduce the exported surface area (#11355)
146+
147+
## 8.0.0-beta.0
148+
149+
This release failed to publish correctly. Use 8.0.0-beta.1 instead.
150+
7151
## 8.0.0-alpha.9
8152

9153
This is the eighth alpha release of Sentry JavaScript SDK v8, which includes a variety of breaking changes.

CODEOWNERS

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,4 @@ packages/replay @getsentry/replay-sdk-web
22
packages/replay-worker @getsentry/replay-sdk-web
33
packages/replay-canvas @getsentry/replay-sdk-web
44
packages/feedback @getsentry/replay-sdk-web
5-
packages/feedback-modal @getsentry/replay-sdk-web
6-
packages/feedback-screenshot @getsentry/replay-sdk-web
75
dev-packages/browser-integration-tests/suites/replay @getsentry/replay-sdk-web

MIGRATION.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ We've removed the following packages:
6565
`@sentry/tracing` has been removed and will no longer be published. See
6666
[below](./MIGRATION.md/#3-removal-of-deprecated-apis) for more details.
6767

68-
For Browser SDKs you can import `BrowserTracing` from the SDK directly:
68+
For Browser SDKs you can import `browserTracingIntegration` from the SDK directly:
6969

7070
```js
7171
// v7
@@ -86,12 +86,13 @@ import * as Sentry from '@sentry/browser';
8686
Sentry.init({
8787
dsn: '__DSN__',
8888
tracesSampleRate: 1.0,
89-
integrations: [new Sentry.BrowserTracing()],
89+
integrations: [Sentry.browserTracingIntegration()],
9090
});
9191
```
9292

93-
If you were importing `@sentry/tracing` for the side effect, you can now use `Sentry.addTracingExtensions()` to add the
94-
tracing extensions to the SDK. `addTracingExtensions` replaces the `addExtensionMethods` method from `@sentry/tracing`.
93+
If you don't want to use `browserTracingIntegration` but still manually start spans, you can now use
94+
`Sentry.registerSpanErrorInstrumentation()` to setup handlers for span instrumentation.
95+
`registerSpanErrorInstrumentation` replaces the `addExtensionMethods` method from `@sentry/tracing`.
9596

9697
```js
9798
// v7
@@ -108,7 +109,7 @@ Sentry.init({
108109
// v8
109110
import * as Sentry from '@sentry/browser';
110111

111-
Sentry.addTracingExtensions();
112+
Sentry.registerSpanErrorInstrumentation();
112113

113114
Sentry.init({
114115
dsn: '__DSN__',

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

Lines changed: 4 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.0.0-alpha.9",
3+
"version": "8.0.0-beta.1",
44
"main": "index.js",
55
"license": "MIT",
66
"engines": {
@@ -23,6 +23,8 @@
2323
"test:bundle:replay:min": "PW_BUNDLE=bundle_replay_min yarn test",
2424
"test:bundle:tracing": "PW_BUNDLE=bundle_tracing yarn test",
2525
"test:bundle:tracing:min": "PW_BUNDLE=bundle_tracing_min yarn test",
26+
"test:bundle:full": "PW_BUNDLE=bundle_tracing_replay_feedback yarn test",
27+
"test:bundle:full:min": "PW_BUNDLE=bundle_tracing_replay_feedback_min yarn test",
2628
"test:cjs": "PW_BUNDLE=cjs yarn test",
2729
"test:esm": "PW_BUNDLE=esm yarn test",
2830
"test:loader": "npx playwright test -c playwright.loader.config.ts --project='chromium'",
@@ -40,7 +42,7 @@
4042
"@babel/preset-typescript": "^7.16.7",
4143
"@playwright/test": "^1.40.1",
4244
"@sentry-internal/rrweb": "2.11.0",
43-
"@sentry/browser": "8.0.0-alpha.9",
45+
"@sentry/browser": "8.0.0-beta.1",
4446
"axios": "1.6.7",
4547
"babel-loader": "^8.2.2",
4648
"html-webpack-plugin": "^5.5.0",

dev-packages/browser-integration-tests/suites/feedback/captureFeedback/test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { expect } from '@playwright/test';
22

33
import { sentryTest } from '../../../utils/fixtures';
4-
import { envelopeRequestParser, getEnvelopeType } from '../../../utils/helpers';
4+
import { envelopeRequestParser, getEnvelopeType, shouldSkipFeedbackTest } from '../../../utils/helpers';
55

6-
sentryTest('should capture feedback (@sentry-internal/feedback import)', async ({ getLocalTestPath, page }) => {
7-
if (process.env.PW_BUNDLE) {
6+
sentryTest('should capture feedback', async ({ getLocalTestPath, page }) => {
7+
if (shouldSkipFeedbackTest()) {
88
sentryTest.skip();
99
}
1010

@@ -39,7 +39,7 @@ sentryTest('should capture feedback (@sentry-internal/feedback import)', async (
3939
await page.locator('[name="name"]').fill('Jane Doe');
4040
await page.locator('[name="email"]').fill('[email protected]');
4141
await page.locator('[name="message"]').fill('my example feedback');
42-
await page.getByLabel('Send Bug Report').click();
42+
await page.locator('[data-sentry-feedback] .btn--primary').click();
4343

4444
const feedbackEvent = envelopeRequestParser((await feedbackRequestPromise).request());
4545
expect(feedbackEvent).toEqual({

dev-packages/browser-integration-tests/suites/feedback/captureFeedbackAndReplay/hasSampling/init.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ window.Sentry = Sentry;
55
Sentry.init({
66
dsn: 'https://[email protected]/1337',
77
replaysOnErrorSampleRate: 1.0,
8-
replaysSessionSampleRate: 0,
8+
replaysSessionSampleRate: 1.0,
99
integrations: [
1010
Sentry.replayIntegration({
1111
flushMinDelay: 200,

0 commit comments

Comments
 (0)