Skip to content

Commit

Permalink
stop using event processor in withSentry
Browse files Browse the repository at this point in the history
  • Loading branch information
lobsterkatie committed Sep 20, 2022
1 parent b6d22fe commit 19c4fb1
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/nextjs/src/utils/withSentry.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { addRequestDataToEvent, captureException, flush, getCurrentHub, startTransaction } from '@sentry/node';
import { captureException, flush, getCurrentHub, startTransaction } from '@sentry/node';
import { extractTraceparentData, hasTracingEnabled } from '@sentry/tracing';
import { Transaction } from '@sentry/types';
import {
Expand Down Expand Up @@ -56,9 +56,6 @@ export const withSentry = (origHandler: NextApiHandler): WrappedNextApiHandler =
const currentScope = getCurrentHub().getScope();

if (currentScope) {
currentScope.addEventProcessor(event =>
event.type !== 'transaction' ? addRequestDataToEvent(event, req) : event,
);
currentScope.setSDKProcessingMetadata({ request: req });

if (hasTracingEnabled()) {
Expand Down

0 comments on commit 19c4fb1

Please sign in to comment.