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 5167c3e commit af60c56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/nextjs/src/common/wrapApiHandlerWithSentry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ export function withSentry(apiHandler: NextApiHandler, parameterizedRoute?: stri

const reqMethod = `${(req.method || 'GET').toUpperCase()} `;

getCurrentScope().setSDKProcessingMetadata({ request: req });

return startSpanManual(
{
...transactionContext,
Expand All @@ -113,8 +115,6 @@ 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 af60c56

Please sign in to comment.