Skip to content

Commit 38f49ca

Browse files
AbhiPrasadmydealforst
authored
meta: CHANGELOG for 7.31.0 (#6787)
Co-authored-by: Francesco Novy <[email protected]> Co-authored-by: Luca Forstner <[email protected]>
1 parent f29f4b1 commit 38f49ca

File tree

2 files changed

+72
-6
lines changed

2 files changed

+72
-6
lines changed

CHANGELOG.md

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

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

7+
## 7.31.0
8+
9+
The Next.js SDK now supports error and performance monitoring for Next.js [middleware](https://nextjs.org/docs/advanced-features/middleware) and [Edge API routes](https://nextjs.org/docs/api-routes/edge-api-routes).
10+
To set it up, add a `sentry.edge.config.js` or `sentry.edge.config.ts` file to the root of your project and initialize the SDK:
11+
12+
```js
13+
// sentry.edge.config.js or sentry.edge.config.ts
14+
15+
import * as Sentry from "@sentry/nextjs";
16+
17+
const SENTRY_DSN = process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN;
18+
19+
Sentry.init({
20+
dsn: SENTRY_DSN || "YOUR DSN HERE",
21+
tracesSampleRate: 1.0,
22+
});
23+
```
24+
25+
The Next.js will automatically instrument Edge API routes and middleware.
26+
If you want to opt out of automatic instrumentation of middleware can use the `autoInstrumentMiddleware` option in the `sentry` object of your Next.js configuration:
27+
28+
```javascript
29+
const moduleExports = {
30+
sentry: {
31+
autoInstrumentMiddleware: false,
32+
},
33+
};
34+
```
35+
36+
Middleware can be manually instrumented by using the `wrapMiddlewareWithSentry` function.
37+
38+
- feat(nextjs): Add Edge Runtime SDK (#6752)
39+
- feat(nextjs): Add optional options argument to `withSentryConfig` as an alternative to the `sentry` property (#6721)
40+
- feat(nextjs): Add edge route and middleware wrappers (#6771)
41+
- feat(nextjs): Auto-wrap edge-routes and middleware (#6746)
42+
- feat(replay): Update rrweb & rrweb-snapshot (#6749)
43+
- feat(replay): Stop recording when retry fails (#6765)
44+
- feat(replay): Stop without retry when receiving bad API response (#6773)
45+
- feat(types): Add Trace Context type (#6714)
46+
- fix(nextjs): Export isomorphic data fetching wrappers from client SDK (#6790)
47+
- fix(nextjs): Make Next.js types isomorphic (#6707)
48+
- fix(node): Handle node build without inspector in LocalVariables integration (#6780)
49+
- fix(otel): Set trace context via Otel Span instead of Sentry span (#6724)
50+
- fix(otel): Prevent baggage from being overwritten (#6709)
51+
- fix(otel): Make sure we handle when sentry-trace is an empty array (#6781)
52+
- fix(remix): Make remix SDK type exports isomorphic (#6715)
53+
- fix(replay): Fix `checkoutEveryNms` (#6722)
54+
- fix(replay): Fix incorrect uncompressed recording size due to encoding (#6740)
55+
- fix(tracing): Attach request instrumentation span to active span instead of current transaction (#6778)
56+
- ref(nextjs): Deprecate `isBuild()` and `IS_BUILD` (#6727)
57+
758
## 7.30.0
859

960
- feat(core): Add `addIntegration` method to client (#6651)

MIGRATION.md

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,33 @@
1-
# Deprecations in 7.x
1+
# Deprecations in 7.x
22

3-
## Deprecated `tracingOrigins` (since 7.19.0) - #6176
3+
## Renaming of Next.js wrapper methods (since 7.31.0) - #6790
44

5-
The `tracingOrigins` option is deprecated in favor of using `shouldCreateSpanForRequest` and `tracePropagationTargets`.
5+
We updated the names of the functions to wrap data fetchers and API routes to better reflect what they are doing.
6+
The old methods can still be used but are deprecated and will be removed in the next major update of the SDK.
67

7-
## Deprecate `componentTrackingPreprocessor` in Svelte SDK (since 7.16.0) - #5936
8+
Following function names were updated:
89

9-
This release adds the `withSentryConfig` feature to the Svelte SDK. It replaces the now deprecated Svelte `componentTrackingPreprocessor` which will be removed in the next major release.
10+
- `withSentryAPI` was renamed to `wrapApiHandlerWithSentry`
11+
- `withSentryGetServerSideProps` was renamed to `wrapGetServerSidePropsWithSentry`
12+
- `withSentryGetStaticProps` was renamed to `wrapGetStaticPropsWithSentry`
13+
- `withSentryServerSideGetInitialProps` was renamed to `wrapGetInitialPropsWithSentry`
14+
- `withSentryServerSideAppGetInitialProps` was renamed to `wrapAppGetInitialPropsWithSentry`
15+
- `withSentryServerSideDocumentGetInitialProps` was renamed to `wrapDocumentGetInitialPropsWithSentry`
16+
- `withSentryServerSideErrorGetInitialProps` was renamed to `wrapErrorGetInitialPropsWithSentry`
17+
18+
## Deprecated `tracingOrigins` (since 7.19.0) - #6176
19+
20+
The `tracingOrigins` option is deprecated in favor of using `shouldCreateSpanForRequest` and `tracePropagationTargets`.
21+
22+
## Deprecate `componentTrackingPreprocessor` in Svelte SDK (since 7.16.0) - #5936
23+
24+
This release adds the `withSentryConfig` feature to the Svelte SDK. It replaces the now deprecated Svelte `componentTrackingPreprocessor` which will be removed in the next major release.
1025

1126
## Deprecate `getGlobalObject` in `@sentry/utils` (since 7.16.0) - #5949
1227

1328
This is no longer used.
1429

15-
## Deprecate @sentry/hub (since 7.15.0) - #5823
30+
## Deprecate @sentry/hub (since 7.15.0) - #5823
1631

1732
This release deprecates `@sentry/hub` and all of it's exports. All of the `@sentry/hub` exports have moved to `@sentry/core`. `@sentry/hub` will be removed in the next major release.
1833

0 commit comments

Comments
 (0)