Skip to content

Commit 9fcfd51

Browse files
authored
Merge pull request #10298 from getsentry/prepare-release/7.95.0
meta(changelog): Update changelog for v7.95.0
2 parents fc0e55f + d98bd74 commit 9fcfd51

File tree

157 files changed

+1801
-1126
lines changed

Some content is hidden

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

157 files changed

+1801
-1126
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ jobs:
102102
- 'packages/replay/**'
103103
- 'packages/replay-canvas/**'
104104
- 'packages/feedback/**'
105+
- 'packages/wasm/**'
105106
browser_integration:
106107
- *shared
107108
- *browser

CHANGELOG.md

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

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

7+
## 7.95.0
8+
9+
### Important Changes
10+
11+
#### Deprecations
12+
13+
This release includes some deprecations in preparation for v8.
14+
15+
Most notably, it deprecates the `Replay` & `Feedback` classes in favor of a functional replacement:
16+
17+
```js
18+
import * as Sentry from '@sentry/browser';
19+
20+
Sentry.init({
21+
integrations: [
22+
// Instead of
23+
new Sentry.Replay(),
24+
new Sentry.Feedback(),
25+
// Use the functional replacement:
26+
Sentry.replayIntegration(),
27+
Sentry.feedbackIntegration(),
28+
],
29+
});
30+
```
31+
32+
- feat(core): Deprecate `Span.origin` in favor of `sentry.origin` attribute (#10260)
33+
- feat(core): Deprecate `Span.parentSpanId` (#10244)
34+
- feat(core): Expose `isInitialized()` to replace checking via `getClient` (#10296)
35+
- feat(replay): Deprecate `Replay`, `ReplayCanvas`, `Feedback` classes (#10270)
36+
- feat(wasm): Deprecate `Wasm` integration class (#10230)
37+
38+
### Other Changes
39+
40+
- feat: Make `parameterize` function available through browser and node API (#10085)
41+
- feat(feedback): Configure feedback border radius (#10289)
42+
- feat(sveltekit): Update default integration handling & deprecate `addOrUpdateIntegration` (#10263)
43+
- fix(replay-canvas): Add missing dependency on @sentry/utils (#10279)
44+
- fix(tracing): Don't send negative ttfb (#10286)
45+
46+
Work in this release contributed by @AleshaOleg. Thank you for your contribution!
47+
748
## 7.94.1
849

950
This release fixes a publishing issue.

MIGRATION.md

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ npx @sentry/migr8@latest
1010
This will let you select which updates to run, and automatically update your code. Make sure to still review all code
1111
changes!
1212

13+
## Deprecate using `getClient()` to check if the SDK was initialized
14+
15+
In v8, `getClient()` will stop returning `undefined` if `Sentry.init()` was not called. For cases where this may be used
16+
to check if Sentry was actually initialized, using `getClient()` will thus not work anymore. Instead, you should use the
17+
new `Sentry.isInitialized()` utility to check this.
18+
1319
## Deprecate `getCurrentHub()`
1420

1521
In v8, you will no longer have a Hub, only Scopes as a concept. This also means that `getCurrentHub()` will eventually
@@ -28,13 +34,17 @@ integrations from the `Integrations.XXX` hash, is deprecated in favor of using t
2834

2935
The following list shows how integrations should be migrated:
3036

31-
| Old | New |
32-
| ------------------------ | ------------------------------- |
33-
| `new InboundFilters()` | `inboundFiltersIntegrations()` |
34-
| `new FunctionToString()` | `functionToStringIntegration()` |
35-
| `new LinkedErrors()` | `linkedErrorsIntegration()` |
36-
| `new ModuleMetadata()` | `moduleMetadataIntegration()` |
37-
| `new RequestData()` | `requestDataIntegration()` |
37+
| Old | New | Packages |
38+
| ------------------------ | ------------------------------- | ------------------------------------------------------------------------------------------------------- |
39+
| `new InboundFilters()` | `inboundFiltersIntegration()` | `@sentry/core`, `@sentry/browser`, `@sentry/node`, `@sentry/deno`, `@sentry/bun`, `@sentry/vercel-edge` |
40+
| `new FunctionToString()` | `functionToStringIntegration()` | `@sentry/core`, `@sentry/browser`, `@sentry/node`, `@sentry/deno`, `@sentry/bun`, `@sentry/vercel-edge` |
41+
| `new LinkedErrors()` | `linkedErrorsIntegration()` | `@sentry/core`, `@sentry/browser`, `@sentry/node`, `@sentry/deno`, `@sentry/bun`, `@sentry/vercel-edge` |
42+
| `new ModuleMetadata()` | `moduleMetadataIntegration()` | `@sentry/core`, `@sentry/browser` |
43+
| `new RequestData()` | `requestDataIntegration()` | `@sentry/core`, `@sentry/node`, `@sentry/deno`, `@sentry/bun`, `@sentry/vercel-edge` |
44+
| `new Wasm() ` | `wasmIntegration()` | `@sentry/wasm` |
45+
| `new Replay()` | `replayIntegration()` | `@sentry/browser` |
46+
| `new ReplayCanvas()` | `replayCanvasIntegration()` | `@sentry/browser` |
47+
| `new Feedback()` | `feedbackIntegration()` | `@sentry/browser` |
3848

3949
## Deprecate `hub.bindClient()` and `makeMain()`
4050

@@ -193,6 +203,7 @@ In v8, the Span class is heavily reworked. The following properties & methods ar
193203
- `span.getTraceContext()`: Use `spanToTraceContext(span)` utility function instead.
194204
- `span.sampled`: Use `span.isRecording()` instead.
195205
- `span.spanId`: Use `span.spanContext().spanId` instead.
206+
- `span.parentSpanId`: Use `spanToJSON(span).parent_span_id` instead.
196207
- `span.traceId`: Use `span.spanContext().traceId` instead.
197208
- `span.name`: Use `spanToJSON(span).description` instead.
198209
- `span.description`: Use `spanToJSON(span).description` instead.
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
import { parameterize } from '@sentry/utils';
2-
31
const x = 'first';
42
const y = 'second';
53

6-
Sentry.captureMessage(parameterize`This is a log statement with ${x} and ${y} params`);
4+
Sentry.captureMessage(Sentry.parameterize`This is a log statement with ${x} and ${y} params`);

dev-packages/browser-integration-tests/suites/public-api/captureMessage/parameterized_message/test.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@ import { sentryTest } from '../../../../utils/fixtures';
55
import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers';
66

77
sentryTest('should capture a parameterized representation of the message', async ({ getLocalTestPath, page }) => {
8-
const bundle = process.env.PW_BUNDLE;
9-
10-
if (bundle && bundle.startsWith('bundle_')) {
11-
sentryTest.skip();
12-
}
13-
148
const url = await getLocalTestPath({ testDir: __dirname });
159

1610
const eventData = await getFirstSentryEnvelopeRequest<Event>(page, url);
Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { expect } from '@playwright/test';
2-
import type { Event } from '@sentry/types';
2+
import type { SerializedEvent } from '@sentry/types';
33

44
import { sentryTest } from '../../../../utils/fixtures';
55
import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../utils/helpers';
@@ -10,7 +10,7 @@ sentryTest('should send a transaction in an envelope', async ({ getLocalTestPath
1010
}
1111

1212
const url = await getLocalTestPath({ testDir: __dirname });
13-
const transaction = await getFirstSentryEnvelopeRequest<Event>(page, url);
13+
const transaction = await getFirstSentryEnvelopeRequest<SerializedEvent>(page, url);
1414

1515
expect(transaction.transaction).toBe('parent_span');
1616
expect(transaction.spans).toBeDefined();
@@ -22,14 +22,13 @@ sentryTest('should report finished spans as children of the root transaction', a
2222
}
2323

2424
const url = await getLocalTestPath({ testDir: __dirname });
25-
const transaction = await getFirstSentryEnvelopeRequest<Event>(page, url);
26-
27-
const rootSpanId = transaction?.contexts?.trace?.spanId;
25+
const transaction = await getFirstSentryEnvelopeRequest<SerializedEvent>(page, url);
2826

2927
expect(transaction.spans).toHaveLength(1);
3028

3129
const span_1 = transaction.spans?.[0];
32-
// eslint-disable-next-line deprecation/deprecation
3330
expect(span_1?.description).toBe('child_span');
34-
expect(span_1?.parentSpanId).toEqual(rootSpanId);
31+
expect(span_1?.parent_span_id).toEqual(transaction?.contexts?.trace?.span_id);
32+
expect(span_1?.origin).toEqual('manual');
33+
expect(span_1?.data?.['sentry.origin']).toEqual('manual');
3534
});
Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { expect } from '@playwright/test';
2-
import type { Event } from '@sentry/types';
2+
import type { SerializedEvent } from '@sentry/types';
33

44
import { sentryTest } from '../../../../utils/fixtures';
55
import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../utils/helpers';
@@ -10,7 +10,7 @@ sentryTest('should report a transaction in an envelope', async ({ getLocalTestPa
1010
}
1111

1212
const url = await getLocalTestPath({ testDir: __dirname });
13-
const transaction = await getFirstSentryEnvelopeRequest<Event>(page, url);
13+
const transaction = await getFirstSentryEnvelopeRequest<SerializedEvent>(page, url);
1414

1515
expect(transaction.transaction).toBe('test_transaction_1');
1616
expect(transaction.spans).toBeDefined();
@@ -22,28 +22,26 @@ sentryTest('should report finished spans as children of the root transaction', a
2222
}
2323

2424
const url = await getLocalTestPath({ testDir: __dirname });
25-
const transaction = await getFirstSentryEnvelopeRequest<Event>(page, url);
25+
const transaction = await getFirstSentryEnvelopeRequest<SerializedEvent>(page, url);
2626

27-
const rootSpanId = transaction?.contexts?.trace?.spanId;
27+
const rootSpanId = transaction?.contexts?.trace?.span_id;
2828

2929
expect(transaction.spans).toHaveLength(3);
3030

3131
const span_1 = transaction.spans?.[0];
3232

33-
// eslint-disable-next-line deprecation/deprecation
34-
expect(span_1?.op).toBe('span_1');
35-
expect(span_1?.parentSpanId).toEqual(rootSpanId);
36-
// eslint-disable-next-line deprecation/deprecation
37-
expect(span_1?.data).toMatchObject({ foo: 'bar', baz: [1, 2, 3] });
33+
expect(span_1).toBeDefined();
34+
expect(span_1!.op).toBe('span_1');
35+
expect(span_1!.parent_span_id).toEqual(rootSpanId);
36+
expect(span_1!.data).toMatchObject({ foo: 'bar', baz: [1, 2, 3] });
3837

3938
const span_3 = transaction.spans?.[1];
40-
// eslint-disable-next-line deprecation/deprecation
41-
expect(span_3?.op).toBe('span_3');
42-
expect(span_3?.parentSpanId).toEqual(rootSpanId);
39+
expect(span_3).toBeDefined();
40+
expect(span_3!.op).toBe('span_3');
41+
expect(span_3!.parent_span_id).toEqual(rootSpanId);
4342

4443
const span_5 = transaction.spans?.[2];
45-
// eslint-disable-next-line deprecation/deprecation
46-
expect(span_5?.op).toBe('span_5');
47-
// eslint-disable-next-line deprecation/deprecation
48-
expect(span_5?.parentSpanId).toEqual(span_3?.spanId);
44+
expect(span_5).toBeDefined();
45+
expect(span_5!.op).toBe('span_5');
46+
expect(span_5!.parent_span_id).toEqual(span_3!.span_id);
4947
});

dev-packages/browser-integration-tests/suites/replay/bufferMode/test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ sentryTest(
6767
// Start buffering and assert that it is enabled
6868
expect(
6969
await page.evaluate(() => {
70+
// eslint-disable-next-line deprecation/deprecation
7071
const replayIntegration = (window as unknown as Window & { Replay: InstanceType<typeof Replay> }).Replay;
7172
// @ts-expect-error private
7273
const replay = replayIntegration._replay;
@@ -87,6 +88,7 @@ sentryTest(
8788
const [req0] = await Promise.all([
8889
reqPromise0,
8990
page.evaluate(async () => {
91+
// eslint-disable-next-line deprecation/deprecation
9092
const replayIntegration = (window as unknown as Window & { Replay: Replay }).Replay;
9193
await replayIntegration.flush();
9294
}),
@@ -210,6 +212,7 @@ sentryTest(
210212
// Start buffering and assert that it is enabled
211213
expect(
212214
await page.evaluate(() => {
215+
// eslint-disable-next-line deprecation/deprecation
213216
const replayIntegration = (window as unknown as Window & { Replay: InstanceType<typeof Replay> }).Replay;
214217
// @ts-expect-error private
215218
const replay = replayIntegration._replay;
@@ -230,6 +233,7 @@ sentryTest(
230233
const [req0] = await Promise.all([
231234
reqPromise0,
232235
page.evaluate(async () => {
236+
// eslint-disable-next-line deprecation/deprecation
233237
const replayIntegration = (window as unknown as Window & { Replay: Replay }).Replay;
234238
await replayIntegration.flush({ continueRecording: false });
235239
}),
@@ -324,6 +328,7 @@ sentryTest(
324328
// Start buffering and assert that it is enabled
325329
expect(
326330
await page.evaluate(() => {
331+
// eslint-disable-next-line deprecation/deprecation
327332
const replayIntegration = (window as unknown as Window & { Replay: InstanceType<typeof Replay> }).Replay;
328333
const replay = replayIntegration['_replay'];
329334
replayIntegration.startBuffering();
@@ -342,6 +347,7 @@ sentryTest(
342347
expect(errorEvent0.tags?.replayId).toBeUndefined();
343348

344349
await page.evaluate(async () => {
350+
// eslint-disable-next-line deprecation/deprecation
345351
const replayIntegration = (window as unknown as Window & { Replay: Replay }).Replay;
346352
replayIntegration['_replay'].getOptions().errorSampleRate = 1.0;
347353
});

dev-packages/browser-integration-tests/suites/replay/dsc/test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ import { sentryTest } from '../../../utils/fixtures';
66
import { envelopeRequestParser, shouldSkipTracingTest, waitForTransactionRequest } from '../../../utils/helpers';
77
import { getReplaySnapshot, shouldSkipReplayTest, waitForReplayRunning } from '../../../utils/replayHelpers';
88

9-
type TestWindow = Window & { Sentry: typeof Sentry; Replay: Sentry.Replay };
9+
type TestWindow = Window & {
10+
Sentry: typeof Sentry;
11+
// eslint-disable-next-line deprecation/deprecation
12+
Replay: Sentry.Replay;
13+
};
1014

1115
sentryTest(
1216
'should add replay_id to dsc of transactions when in session mode',

dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-fid/test.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { expect } from '@playwright/test';
2-
import type { Event } from '@sentry/types';
2+
import type { SerializedEvent } from '@sentry/types';
33

44
import { sentryTest } from '../../../../utils/fixtures';
55
import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../utils/helpers';
@@ -16,16 +16,14 @@ sentryTest('should capture a FID vital.', async ({ browserName, getLocalTestPath
1616
// To trigger FID
1717
await page.click('#fid-btn');
1818

19-
const eventData = await getFirstSentryEnvelopeRequest<Event>(page);
19+
const eventData = await getFirstSentryEnvelopeRequest<SerializedEvent>(page);
2020

2121
expect(eventData.measurements).toBeDefined();
2222
expect(eventData.measurements?.fid?.value).toBeDefined();
2323

24-
// eslint-disable-next-line deprecation/deprecation
2524
const fidSpan = eventData.spans?.filter(({ description }) => description === 'first input delay')[0];
2625

2726
expect(fidSpan).toBeDefined();
28-
// eslint-disable-next-line deprecation/deprecation
2927
expect(fidSpan?.op).toBe('ui.action');
30-
expect(fidSpan?.parentSpanId).toBe(eventData.contexts?.trace_span_id);
28+
expect(fidSpan?.parent_span_id).toBe(eventData.contexts?.trace?.span_id);
3129
});
Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { expect } from '@playwright/test';
2-
import type { Event } from '@sentry/types';
2+
import type { SerializedEvent } from '@sentry/types';
33

44
import { sentryTest } from '../../../../utils/fixtures';
55
import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../utils/helpers';
@@ -11,18 +11,16 @@ sentryTest('should capture FP vital.', async ({ browserName, getLocalTestPath, p
1111
}
1212

1313
const url = await getLocalTestPath({ testDir: __dirname });
14-
const eventData = await getFirstSentryEnvelopeRequest<Event>(page, url);
14+
const eventData = await getFirstSentryEnvelopeRequest<SerializedEvent>(page, url);
1515

1616
expect(eventData.measurements).toBeDefined();
1717
expect(eventData.measurements?.fp?.value).toBeDefined();
1818

19-
// eslint-disable-next-line deprecation/deprecation
2019
const fpSpan = eventData.spans?.filter(({ description }) => description === 'first-paint')[0];
2120

2221
expect(fpSpan).toBeDefined();
23-
// eslint-disable-next-line deprecation/deprecation
2422
expect(fpSpan?.op).toBe('paint');
25-
expect(fpSpan?.parentSpanId).toBe(eventData.contexts?.trace_span_id);
23+
expect(fpSpan?.parent_span_id).toBe(eventData.contexts?.trace?.span_id);
2624
});
2725

2826
sentryTest('should capture FCP vital.', async ({ getLocalTestPath, page }) => {
@@ -31,16 +29,14 @@ sentryTest('should capture FCP vital.', async ({ getLocalTestPath, page }) => {
3129
}
3230

3331
const url = await getLocalTestPath({ testDir: __dirname });
34-
const eventData = await getFirstSentryEnvelopeRequest<Event>(page, url);
32+
const eventData = await getFirstSentryEnvelopeRequest<SerializedEvent>(page, url);
3533

3634
expect(eventData.measurements).toBeDefined();
3735
expect(eventData.measurements?.fcp?.value).toBeDefined();
3836

39-
// eslint-disable-next-line deprecation/deprecation
4037
const fcpSpan = eventData.spans?.filter(({ description }) => description === 'first-contentful-paint')[0];
4138

4239
expect(fcpSpan).toBeDefined();
43-
// eslint-disable-next-line deprecation/deprecation
4440
expect(fcpSpan?.op).toBe('paint');
45-
expect(fcpSpan?.parentSpanId).toBe(eventData.contexts?.trace_span_id);
41+
expect(fcpSpan?.parent_span_id).toBe(eventData.contexts?.trace?.span_id);
4642
});

dev-packages/e2e-tests/test-applications/nextjs-app-dir/tests/middleware.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ test('Should trace outgoing fetch requests inside middleware and create breadcru
6969
type: 'fetch',
7070
url: 'http://localhost:3030/',
7171
'sentry.op': 'http.client',
72+
'sentry.origin': 'auto.http.wintercg_fetch',
7273
},
7374
description: 'GET http://localhost:3030/',
7475
op: 'http.client',

dev-packages/e2e-tests/test-applications/node-experimental-fastify-app/tests/propagation.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ test('Propagates trace for outgoing http requests', async ({ baseURL }) => {
6464
'otel.kind': 'SERVER',
6565
'http.response.status_code': 200,
6666
'sentry.op': 'http.server',
67+
'sentry.origin': 'auto.http.otel.http',
6768
},
6869
op: 'http.server',
6970
span_id: expect.any(String),
@@ -87,6 +88,7 @@ test('Propagates trace for outgoing http requests', async ({ baseURL }) => {
8788
'otel.kind': 'SERVER',
8889
'http.response.status_code': 200,
8990
'sentry.op': 'http.server',
91+
'sentry.origin': 'auto.http.otel.http',
9092
},
9193
op: 'http.server',
9294
parent_span_id: outgoingHttpSpanId,
@@ -159,6 +161,7 @@ test('Propagates trace for outgoing fetch requests', async ({ baseURL }) => {
159161
'otel.kind': 'SERVER',
160162
'http.response.status_code': 200,
161163
'sentry.op': 'http.server',
164+
'sentry.origin': 'auto.http.otel.http',
162165
},
163166
op: 'http.server',
164167
span_id: expect.any(String),
@@ -182,6 +185,7 @@ test('Propagates trace for outgoing fetch requests', async ({ baseURL }) => {
182185
'otel.kind': 'SERVER',
183186
'http.response.status_code': 200,
184187
'sentry.op': 'http.server',
188+
'sentry.origin': 'auto.http.otel.http',
185189
},
186190
op: 'http.server',
187191
parent_span_id: outgoingHttpSpanId,

0 commit comments

Comments
 (0)