The Next.js SDK now supports error and performance monitoring for Next.js middleware and Edge API routes.
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:
The Next.js will automatically instrument Edge API routes and middleware.
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:
Dependabot commands
You can trigger Dependabot actions by commenting on this MR
$dependabot rebase will rebase this MR
$dependabot recreate will recreate this MR rewriting all the manual changes and resolving conflicts
Bumps [@sentry/tracing](https://github.com/getsentry/sentry-javascript) from 7.30.0 to 7.31.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md"><code>@sentry/tracing</code>'s changelog</a>.</em></p>
<blockquote>
<h2>7.31.0</h2>
<p>The Next.js SDK now supports error and performance monitoring for Next.js <a href="https://nextjs.org/docs/advanced-features/middleware">middleware</a> and <a href="https://nextjs.org/docs/api-routes/edge-api-routes">Edge API routes</a>.
To set it up, add a <code>sentry.edge.config.js</code> or <code>sentry.edge.config.ts</code> file to the root of your project and initialize the SDK:</p>
<pre lang="js"><code>// sentry.edge.config.js or sentry.edge.config.ts
<p>import * as Sentry from "<code>@sentry/nextjs</code>";</p>
<p>const SENTRY_DSN = process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN;</p>
<p>Sentry.init({
dsn: SENTRY_DSN || "YOUR DSN HERE",
tracesSampleRate: 1.0,
});
</code></pre></p>
<p>The Next.js will automatically instrument Edge API routes and middleware.
If you want to opt out of automatic instrumentation of middleware can use the <code>autoInstrumentMiddleware</code> option in the <code>sentry</code> object of your Next.js configuration:</p>
<pre lang="javascript"><code>const moduleExports = {
sentry: {
autoInstrumentMiddleware: false,
},
};
</code></pre>
<p>Middleware can be manually instrumented by using the <code>wrapMiddlewareWithSentry</code> function.</p>
<ul>
<li>feat(nextjs): Add Edge Runtime SDK (<a href="https://github.com/getsentry/sentry-javascript/issues/6752">#6752</a>)</li>
<li>feat(nextjs): Add optional options argument to <code>withSentryConfig</code> as an alternative to the <code>sentry</code> property (<a href="https://github.com/getsentry/sentry-javascript/issues/6721">#6721</a>)</li>
<li>feat(nextjs): Add edge route and middleware wrappers (<a href="https://github.com/getsentry/sentry-javascript/issues/6771">#6771</a>)</li>
<li>feat(nextjs): Auto-wrap edge-routes and middleware (<a href="https://github.com/getsentry/sentry-javascript/issues/6746">#6746</a>)</li>
<li>feat(replay): Update rrweb & rrweb-snapshot (<a href="https://github.com/getsentry/sentry-javascript/issues/6749">#6749</a>)</li>
<li>feat(replay): Stop recording when retry fails (<a href="https://github.com/getsentry/sentry-javascript/issues/6765">#6765</a>)</li>
<li>feat(replay): Stop without retry when receiving bad API response (<a href="https://github.com/getsentry/sentry-javascript/issues/6773">#6773</a>)</li>
<li>feat(types): Add Trace Context type (<a href="https://github.com/getsentry/sentry-javascript/issues/6714">#6714</a>)</li>
<li>fix(nextjs): Export isomorphic data fetching wrappers from client SDK (<a href="https://github.com/getsentry/sentry-javascript/issues/6790">#6790</a>)</li>
<li>fix(nextjs): Make Next.js types isomorphic (<a href="https://github.com/getsentry/sentry-javascript/issues/6707">#6707</a>)</li>
<li>fix(node): Handle node build without inspector in LocalVariables integration (<a href="https://github.com/getsentry/sentry-javascript/issues/6780">#6780</a>)</li>
<li>fix(otel): Set trace context via Otel Span instead of Sentry span (<a href="https://github.com/getsentry/sentry-javascript/issues/6724">#6724</a>)</li>
<li>fix(otel): Prevent baggage from being overwritten (<a href="https://github.com/getsentry/sentry-javascript/issues/6709">#6709</a>)</li>
<li>fix(otel): Make sure we handle when sentry-trace is an empty array (<a href="https://github.com/getsentry/sentry-javascript/issues/6781">#6781</a>)</li>
<li>fix(remix): Make remix SDK type exports isomorphic (<a href="https://github.com/getsentry/sentry-javascript/issues/6715">#6715</a>)</li>
<li>fix(replay): Fix <code>checkoutEveryNms</code> (<a href="https://github.com/getsentry/sentry-javascript/issues/6722">#6722</a>)</li>
<li>fix(replay): Fix incorrect uncompressed recording size due to encoding (<a href="https://github.com/getsentry/sentry-javascript/issues/6740">#6740</a>)</li>
<li>fix(tracing): Attach request instrumentation span to active span instead of current transaction (<a href="https://github.com/getsentry/sentry-javascript/issues/6778">#6778</a>)</li>
<li>ref(nextjs): Deprecate <code>isBuild()</code> and <code>IS_BUILD</code> (<a href="https://github.com/getsentry/sentry-javascript/issues/6727">#6727</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/getsentry/sentry-javascript/commit/ead59adfe6de12cd93eef5c40d942d5457e06a1a"><code>ead59ad</code></a> release: 7.31.0</li>
<li><a href="https://github.com/getsentry/sentry-javascript/commit/38f49ca22176d82646fa08d46cdfeecf1c0b7e98"><code>38f49ca</code></a> meta: CHANGELOG for 7.31.0 (<a href="https://github.com/getsentry/sentry-javascript/issues/6787">#6787</a>)</li>
<li><a href="https://github.com/getsentry/sentry-javascript/commit/f29f4b11cab66c6cc6423a8b9525aa3f20a74b96"><code>f29f4b1</code></a> fix(nextjs): Export isomorphic data fetching wrappers from client SDK (<a href="https://github.com/getsentry/sentry-javascript/issues/6790">#6790</a>)</li>
<li><a href="https://github.com/getsentry/sentry-javascript/commit/28a430d36c68458b1780c8a6198ab21d7e2f9949"><code>28a430d</code></a> ref(nextjs): Rename wrapper functions (<a href="https://github.com/getsentry/sentry-javascript/issues/6788">#6788</a>)</li>
<li><a href="https://github.com/getsentry/sentry-javascript/commit/aed2ce6bd5c11bbf51ea4b20de4d9de9886f169f"><code>aed2ce6</code></a> fix(replay): Fix incorrect uncompressed recording size due to encoding (<a href="https://github.com/getsentry/sentry-javascript/issues/6740">#6740</a>)</li>
<li><a href="https://github.com/getsentry/sentry-javascript/commit/4365c66390596cb7f7ef3cf9bac0496ae6988507"><code>4365c66</code></a> chore: Add flaky test template (<a href="https://github.com/getsentry/sentry-javascript/issues/6786">#6786</a>)</li>
<li><a href="https://github.com/getsentry/sentry-javascript/commit/06b34551038fa0468563a201a24f6746157fb2aa"><code>06b3455</code></a> fix(node): Handle node build without <code>inspector</code> in <code>LocalVariables</code> integrat...</li>
<li><a href="https://github.com/getsentry/sentry-javascript/commit/81ef0cabe3fb6d401de8e3ba2acbdf4795d84610"><code>81ef0ca</code></a> feat(replay): Stop without retry when receiving bad API response (<a href="https://github.com/getsentry/sentry-javascript/issues/6773">#6773</a>)</li>
<li><a href="https://github.com/getsentry/sentry-javascript/commit/1e72c0c3d9d9342a2d0421e350984a90946cacd6"><code>1e72c0c</code></a> ci(replay): Overhead measurement (<a href="https://github.com/getsentry/sentry-javascript/issues/6611">#6611</a>)</li>
<li><a href="https://github.com/getsentry/sentry-javascript/commit/ed136deb8d3f84cd11c34e868c877d03795cf3cb"><code>ed136de</code></a> fix(tracing): Attach request instrumentation span to active span instead of c...</li>
<li>Additional commits viewable in <a href="https://github.com/getsentry/sentry-javascript/compare/7.30.0...7.31.0">compare view</a></li>
</ul>
</details>
<br />
---
<details>
<summary>Dependabot commands</summary>
<br />
You can trigger Dependabot actions by commenting on this MR
- `$dependabot rebase` will rebase this MR
- `$dependabot recreate` will recreate this MR rewriting all the manual changes and resolving conflicts
</details>
argoyle
(Migrated from gitlab.com)
merged commit into master2023-01-17 14:10:40 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Bumps @sentry/tracing from 7.30.0 to 7.31.0.
Changelog
Sourced from
@sentry/tracing's changelog.Commits
ead59adrelease: 7.31.038f49cameta: CHANGELOG for 7.31.0 (#6787)f29f4b1fix(nextjs): Export isomorphic data fetching wrappers from client SDK (#6790)28a430dref(nextjs): Rename wrapper functions (#6788)aed2ce6fix(replay): Fix incorrect uncompressed recording size due to encoding (#6740)4365c66chore: Add flaky test template (#6786)06b3455fix(node): Handle node build withoutinspectorinLocalVariablesintegrat...81ef0cafeat(replay): Stop without retry when receiving bad API response (#6773)1e72c0cci(replay): Overhead measurement (#6611)ed136defix(tracing): Attach request instrumentation span to active span instead of c...Dependabot commands
You can trigger Dependabot actions by commenting on this MR
$dependabot rebasewill rebase this MR$dependabot recreatewill recreate this MR rewriting all the manual changes and resolving conflicts