Skip to content

Commit dac328a

Browse files
authored
chore(changelog): Add entry for tanstack start wrapFetchWithSentry (#18558)
Forgot to add a changeling entry for the server function tracing PR. Closes #18559 (added automatically)
1 parent f196ba2 commit dac328a

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

CHANGELOG.md

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

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

7+
- **feat(tanstackstart-react): Trace server functions ([#18500](https://github.com/getsentry/sentry-javascript/pull/18500))**
8+
9+
To enable tracing for server-side requests, you can now explicitly define a [server entry point](https://tanstack.com/start/latest/docs/framework/react/guide/server-entry-point) in your application and wrap your request handler with `wrapFetchWithSentry`.
10+
11+
```typescript
12+
// src/server.ts
13+
import { wrapFetchWithSentry } from '@sentry/tanstackstart-react';
14+
import handler, { createServerEntry } from '@tanstack/react-start/server-entry';
15+
16+
export default createServerEntry(
17+
wrapFetchWithSentry({
18+
fetch(request: Request) {
19+
return handler.fetch(request);
20+
},
21+
}),
22+
);
23+
```
24+
725
- **feat(core): Apply scope attributes to logs** ([18184](https://github.com/getsentry/sentry-javascript/pull/18184))
826

927
You can now set attributes on the SDK's scopes which will be applied to all logs as long as the respective scopes are active. For the time being, only `string`, `number` and `boolean` attribute values are supported.

0 commit comments

Comments
 (0)