Skip to content

Commit

Permalink
Set request sdk processing metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
lforst committed Dec 22, 2023
1 parent 1d2f80b commit 5167c3e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/nextjs/src/common/wrapApiHandlerWithSentry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {
addTracingExtensions,
captureException,
continueTrace,
getCurrentScope,
runWithAsyncContext,
startSpanManual,
} from '@sentry/core';
Expand Down Expand Up @@ -112,6 +113,8 @@ export function withSentry(apiHandler: NextApiHandler, parameterizedRoute?: stri
},
},
async span => {
getCurrentScope().setSDKProcessingMetadata({ request: req });

// eslint-disable-next-line @typescript-eslint/unbound-method
res.end = new Proxy(res.end, {
apply(target, thisArg, argArray) {
Expand Down

0 comments on commit 5167c3e

Please sign in to comment.