Skip to content

Commit 1768ba0

Browse files
committed
meta(changelog): Update changelog for 7.69.0
1 parent 90ee2a4 commit 1768ba0

File tree

1 file changed

+87
-0
lines changed

1 file changed

+87
-0
lines changed

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)

0 commit comments

Comments
 (0)