Skip to content

Commit 05583e5

Browse files
authored
Merge pull request #9009 from getsentry/prepare-release/7.69.0
meta(changelog): Update changelog for 7.69.0
2 parents 0b229bb + 1768ba0 commit 05583e5

File tree

259 files changed

+3948
-2677
lines changed

Some content is hidden

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

259 files changed

+3948
-2677
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -789,9 +789,11 @@ jobs:
789789
'create-remix-app',
790790
'nextjs-app-dir',
791791
'react-create-hash-router',
792+
'react-router-6-use-routes',
792793
'standard-frontend-react',
793794
'standard-frontend-react-tracing-import',
794795
'sveltekit',
796+
'generic-ts3.8',
795797
]
796798
build-command:
797799
- false
@@ -818,7 +820,7 @@ jobs:
818820
- name: Set up Node
819821
uses: actions/setup-node@v3
820822
with:
821-
node-version-file: 'package.json'
823+
node-version-file: 'packages/e2e-tests/package.json'
822824
- name: Restore caches
823825
uses: ./.github/actions/restore-cache
824826
env:
@@ -833,7 +835,7 @@ jobs:
833835
- name: Get node version
834836
id: versions
835837
run: |
836-
echo "echo node=$(jq -r '.volta.node' package.json)" >> $GITHUB_OUTPUT
838+
echo "echo node=$(jq -r '.volta.node' packages/e2e-tests/package.json)" >> $GITHUB_OUTPUT
837839
838840
- name: Validate Verdaccio
839841
run: yarn test:validate

CHANGELOG.md

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

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

7+
## 7.69.0
8+
9+
### Important Changes
10+
11+
- **New Performance APIs**
12+
- feat: Update span performance API names (#8971)
13+
- feat(core): Introduce startSpanManual (#8913)
14+
15+
This release introduces a new set of top level APIs for the Performance Monitoring SDKs. These aim to simplify creating spans and reduce the boilerplate needed for performance instrumentation. The three new methods introduced are `Sentry.startSpan`, `Sentry.startInactiveSpan`, and `Sentry.startSpanManual`. These methods are available in the browser and node SDKs.
16+
17+
`Sentry.startSpan` wraps a callback in a span. The span is automatically finished when the callback returns. This is the recommended way to create spans.
18+
19+
```js
20+
// Start a span that tracks the duration of expensiveFunction
21+
const result = Sentry.startSpan({ name: 'important function' }, () => {
22+
return expensiveFunction();
23+
});
24+
25+
// You can also mutate the span wrapping the callback to set data or status
26+
Sentry.startSpan({ name: 'important function' }, (span) => {
27+
// span is undefined if performance monitoring is turned off or if
28+
// the span was not sampled. This is done to reduce overhead.
29+
span?.setData('version', '1.0.0');
30+
return expensiveFunction();
31+
});
32+
```
33+
34+
If you don't want the span to finish when the callback returns, use `Sentry.startSpanManual` to control when the span is finished. This is useful for event emitters or similar.
35+
36+
```js
37+
// Start a span that tracks the duration of middleware
38+
function middleware(_req, res, next) {
39+
return Sentry.startSpanManual({ name: 'middleware' }, (span, finish) => {
40+
res.once('finish', () => {
41+
span?.setHttpStatus(res.status);
42+
finish();
43+
});
44+
return next();
45+
});
46+
}
47+
```
48+
49+
`Sentry.startSpan` and `Sentry.startSpanManual` create a span and make it active for the duration of the callback. Any spans created while this active span is running will be added as a child span to it. If you want to create a span without making it active, use `Sentry.startInactiveSpan`. This is useful for creating parallel spans that are not related to each other.
50+
51+
```js
52+
const span1 = Sentry.startInactiveSpan({ name: 'span1' });
53+
54+
someWork();
55+
56+
const span2 = Sentry.startInactiveSpan({ name: 'span2' });
57+
58+
moreWork();
59+
60+
const span3 = Sentry.startInactiveSpan({ name: 'span3' });
61+
62+
evenMoreWork();
63+
64+
span1?.finish();
65+
span2?.finish();
66+
span3?.finish();
67+
```
68+
69+
### Other Changes
70+
71+
- feat(core): Export `BeforeFinishCallback` type (#8999)
72+
- build(eslint): Enforce that ts-expect-error is used (#8987)
73+
- feat(integration): Ensure `LinkedErrors` integration runs before all event processors (#8956)
74+
- feat(node-experimental): Keep breadcrumbs on transaction (#8967)
75+
- feat(redux): Add 'attachReduxState' option (#8953)
76+
- feat(remix): Accept `org`, `project` and `url` as args to upload script (#8985)
77+
- fix(utils): Prevent iterating over VueViewModel (#8981)
78+
- fix(utils): uuidv4 fix for cloudflare (#8968)
79+
- fix(core): Always use event message and exception values for `ignoreErrors` (#8986)
80+
- fix(nextjs): Add new potential location for Next.js request AsyncLocalStorage (#9006)
81+
- fix(node-experimental): Ensure we only create HTTP spans when outgoing (#8966)
82+
- fix(node-experimental): Ignore OPTIONS & HEAD requests (#9001)
83+
- fix(node-experimental): Ignore outgoing Sentry requests (#8994)
84+
- fix(node-experimental): Require parent span for `pg` spans (#8993)
85+
- fix(node-experimental): Use Sentry logger as Otel logger (#8960)
86+
- fix(node-otel): Refactor OTEL span reference cleanup (#9000)
87+
- fix(react): Switch to props in `useRoutes` (#8998)
88+
- fix(remix): Add `glob` to Remix SDK dependencies. (#8963)
89+
- fix(replay): Ensure `handleRecordingEmit` aborts when event is not added (#8938)
90+
- fix(replay): Fully stop & restart session when it expires (#8834)
91+
92+
Work in this release contributed by @Duncanxyz and @malay44. Thank you for your contributions!
93+
794
## 7.68.0
895
996
- feat(browser): Add `BroadcastChannel` and `SharedWorker` to TryCatch EventTargets (#8943)

MIGRATION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Deprecations in 7.x
22

3-
You can use [@sentry/migr8](https://www.npmjs.com/package/@sentry/migr8) to automatically update your SDK usage and fix most deprecations:
3+
You can use the **Experimental** [@sentry/migr8](https://www.npmjs.com/package/@sentry/migr8) to automatically update your SDK usage and fix most deprecations. This requires Node 18+.
44

55
```bash
66
npx @sentry/migr8@latest

packages/angular/src/tracing.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,7 @@ export function getActiveTransaction(): Transaction | undefined {
5555

5656
if (currentHub) {
5757
const scope = currentHub.getScope();
58-
if (scope) {
59-
return scope.getTransaction();
60-
}
58+
return scope.getTransaction();
6159
}
6260

6361
return undefined;

packages/angular/test/errorhandler.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ describe('SentryErrorHandler', () => {
532532
}),
533533
};
534534

535-
// @ts-ignore this is a minmal hub, we're missing a few props but that's ok
535+
// @ts-expect-error this is a minmal hub, we're missing a few props but that's ok
536536
jest.spyOn(SentryBrowser, 'getCurrentHub').mockImplementationOnce(() => {
537537
return { getClient: () => client };
538538
});

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ sentryTest(
6868
expect(
6969
await page.evaluate(() => {
7070
const replayIntegration = (window as unknown as Window & { Replay: InstanceType<typeof Replay> }).Replay;
71-
// @ts-ignore private
71+
// @ts-expect-error private
7272
const replay = replayIntegration._replay;
7373
replayIntegration.startBuffering();
7474
return replay.isEnabled();
@@ -210,7 +210,7 @@ sentryTest(
210210
expect(
211211
await page.evaluate(() => {
212212
const replayIntegration = (window as unknown as Window & { Replay: InstanceType<typeof Replay> }).Replay;
213-
// @ts-ignore private
213+
// @ts-expect-error private
214214
const replay = replayIntegration._replay;
215215
replayIntegration.startBuffering();
216216
return replay.isEnabled();

packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureRequestBody/test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ sentryTest('captures text request body', async ({ getLocalTestPath, page, browse
4141
method: 'POST',
4242
body: 'input body',
4343
}).then(() => {
44-
// @ts-ignore Sentry is a global
44+
// @ts-expect-error Sentry is a global
4545
Sentry.captureException('test error');
4646
});
4747
/* eslint-enable */
@@ -120,7 +120,7 @@ sentryTest('captures JSON request body', async ({ getLocalTestPath, page, browse
120120
method: 'POST',
121121
body: '{"foo":"bar"}',
122122
}).then(() => {
123-
// @ts-ignore Sentry is a global
123+
// @ts-expect-error Sentry is a global
124124
Sentry.captureException('test error');
125125
});
126126
/* eslint-enable */
@@ -203,7 +203,7 @@ sentryTest('captures non-text request body', async ({ getLocalTestPath, page, br
203203
method: 'POST',
204204
body: body,
205205
}).then(() => {
206-
// @ts-ignore Sentry is a global
206+
// @ts-expect-error Sentry is a global
207207
Sentry.captureException('test error');
208208
});
209209
/* eslint-enable */
@@ -282,7 +282,7 @@ sentryTest('captures text request body when matching relative URL', async ({ get
282282
method: 'POST',
283283
body: 'input body',
284284
}).then(() => {
285-
// @ts-ignore Sentry is a global
285+
// @ts-expect-error Sentry is a global
286286
Sentry.captureException('test error');
287287
});
288288
/* eslint-enable */
@@ -359,7 +359,7 @@ sentryTest('does not capture request body when URL does not match', async ({ get
359359
method: 'POST',
360360
body: 'input body',
361361
}).then(() => {
362-
// @ts-ignore Sentry is a global
362+
// @ts-expect-error Sentry is a global
363363
Sentry.captureException('test error');
364364
});
365365
/* eslint-enable */

packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureRequestHeaders/test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ sentryTest('handles empty/missing request headers', async ({ getLocalTestPath, p
3838
fetch('http://localhost:7654/foo', {
3939
method: 'POST',
4040
}).then(() => {
41-
// @ts-ignore Sentry is a global
41+
// @ts-expect-error Sentry is a global
4242
Sentry.captureException('test error');
4343
});
4444
/* eslint-enable */
@@ -117,7 +117,7 @@ sentryTest('captures request headers as POJO', async ({ getLocalTestPath, page,
117117
'X-Test-Header': 'test-value',
118118
},
119119
}).then(() => {
120-
// @ts-ignore Sentry is a global
120+
// @ts-expect-error Sentry is a global
121121
Sentry.captureException('test error');
122122
});
123123
/* eslint-enable */
@@ -201,7 +201,7 @@ sentryTest('captures request headers on Request', async ({ getLocalTestPath, pag
201201
});
202202
/* eslint-disable */
203203
fetch(request).then(() => {
204-
// @ts-ignore Sentry is a global
204+
// @ts-expect-error Sentry is a global
205205
Sentry.captureException('test error');
206206
});
207207
/* eslint-enable */
@@ -284,7 +284,7 @@ sentryTest('captures request headers as Headers instance', async ({ getLocalTest
284284
method: 'POST',
285285
headers,
286286
}).then(() => {
287-
// @ts-ignore Sentry is a global
287+
// @ts-expect-error Sentry is a global
288288
Sentry.captureException('test error');
289289
});
290290
/* eslint-enable */
@@ -367,7 +367,7 @@ sentryTest('does not captures request headers if URL does not match', async ({ g
367367
'X-Test-Header': 'test-value',
368368
},
369369
}).then(() => {
370-
// @ts-ignore Sentry is a global
370+
// @ts-expect-error Sentry is a global
371371
Sentry.captureException('test error');
372372
});
373373
/* eslint-enable */

packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureRequestSize/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ sentryTest('captures request body size when body is sent', async ({ getLocalTest
3939
method: 'POST',
4040
body: '{"foo":"bar"}',
4141
}).then(() => {
42-
// @ts-ignore Sentry is a global
42+
// @ts-expect-error Sentry is a global
4343
Sentry.captureException('test error');
4444
});
4545
/* eslint-enable */
@@ -125,7 +125,7 @@ sentryTest('captures request size from non-text request body', async ({ getLocal
125125
method: 'POST',
126126
body: blob,
127127
}).then(() => {
128-
// @ts-ignore Sentry is a global
128+
// @ts-expect-error Sentry is a global
129129
Sentry.captureException('test error');
130130
});
131131
/* eslint-enable */

packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureResponseBody/test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ sentryTest('captures text response body', async ({ getLocalTestPath, page, brows
4141
fetch('http://localhost:7654/foo', {
4242
method: 'POST',
4343
}).then(() => {
44-
// @ts-ignore Sentry is a global
44+
// @ts-expect-error Sentry is a global
4545
Sentry.captureException('test error');
4646
});
4747
/* eslint-enable */
@@ -122,7 +122,7 @@ sentryTest('captures JSON response body', async ({ getLocalTestPath, page, brows
122122
fetch('http://localhost:7654/foo', {
123123
method: 'POST',
124124
}).then(() => {
125-
// @ts-ignore Sentry is a global
125+
// @ts-expect-error Sentry is a global
126126
Sentry.captureException('test error');
127127
});
128128
/* eslint-enable */
@@ -203,7 +203,7 @@ sentryTest('captures non-text response body', async ({ getLocalTestPath, page, b
203203
fetch('http://localhost:7654/foo', {
204204
method: 'POST',
205205
}).then(() => {
206-
// @ts-ignore Sentry is a global
206+
// @ts-expect-error Sentry is a global
207207
Sentry.captureException('test error');
208208
});
209209
/* eslint-enable */
@@ -282,7 +282,7 @@ sentryTest('does not capture response body when URL does not match', async ({ ge
282282
fetch('http://localhost:7654/bar', {
283283
method: 'POST',
284284
}).then(() => {
285-
// @ts-ignore Sentry is a global
285+
// @ts-expect-error Sentry is a global
286286
Sentry.captureException('test error');
287287
});
288288
/* eslint-enable */

packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureResponseHeaders/test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ sentryTest('handles empty headers', async ({ getLocalTestPath, page, browserName
3838
await page.evaluate(() => {
3939
/* eslint-disable */
4040
fetch('http://localhost:7654/foo').then(() => {
41-
// @ts-ignore Sentry is a global
41+
// @ts-expect-error Sentry is a global
4242
Sentry.captureException('test error');
4343
});
4444
/* eslint-enable */
@@ -113,7 +113,7 @@ sentryTest('captures response headers', async ({ getLocalTestPath, page }) => {
113113
await page.evaluate(() => {
114114
/* eslint-disable */
115115
fetch('http://localhost:7654/foo').then(() => {
116-
// @ts-ignore Sentry is a global
116+
// @ts-expect-error Sentry is a global
117117
Sentry.captureException('test error');
118118
});
119119
/* eslint-enable */
@@ -194,7 +194,7 @@ sentryTest('does not capture response headers if URL does not match', async ({ g
194194
await page.evaluate(() => {
195195
/* eslint-disable */
196196
fetch('http://localhost:7654/bar').then(() => {
197-
// @ts-ignore Sentry is a global
197+
// @ts-expect-error Sentry is a global
198198
Sentry.captureException('test error');
199199
});
200200
/* eslint-enable */

packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureResponseSize/test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ sentryTest('captures response size from Content-Length header if available', asy
4343
await page.evaluate(() => {
4444
/* eslint-disable */
4545
fetch('http://localhost:7654/foo').then(() => {
46-
// @ts-ignore Sentry is a global
46+
// @ts-expect-error Sentry is a global
4747
Sentry.captureException('test error');
4848
});
4949
/* eslint-enable */
@@ -131,7 +131,7 @@ sentryTest('captures response size without Content-Length header', async ({ getL
131131
await page.evaluate(() => {
132132
/* eslint-disable */
133133
fetch('http://localhost:7654/foo').then(() => {
134-
// @ts-ignore Sentry is a global
134+
// @ts-expect-error Sentry is a global
135135
Sentry.captureException('test error');
136136
});
137137
/* eslint-enable */
@@ -218,7 +218,7 @@ sentryTest('captures response size from non-text response body', async ({ getLoc
218218
fetch('http://localhost:7654/foo', {
219219
method: 'POST',
220220
}).then(() => {
221-
// @ts-ignore Sentry is a global
221+
// @ts-expect-error Sentry is a global
222222
Sentry.captureException('test error');
223223
});
224224
/* eslint-enable */

0 commit comments

Comments
 (0)