Skip to content

Commit c0b4725

Browse files
committed
add request to scope metadata in withSentry
1 parent 83ba456 commit c0b4725

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/nextjs/src/utils/withSentry.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export const withSentry = (origHandler: NextApiHandler): WrappedNextApiHandler =
4444
currentScope.addEventProcessor(event =>
4545
event.type !== 'transaction' ? addRequestDataToEvent(event, req) : event,
4646
);
47+
currentScope.setSDKProcessingMetadata({ request: req });
4748

4849
if (hasTracingEnabled()) {
4950
// If there is a trace header set, extract the data from it (parentSpanId, traceId, and sampling decision)

0 commit comments

Comments
 (0)