Skip to content

Commit 3ea5373

Browse files
authored
fix(nextjs): Use global scope for generic event filters (#12205)
1 parent 5791a38 commit 3ea5373

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/nextjs/src/server/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { addEventProcessor, applySdkMetadata, getClient, getGlobalScope } from '@sentry/core';
1+
import { applySdkMetadata, getClient, getGlobalScope } from '@sentry/core';
22
import { getDefaultIntegrations, init as nodeInit } from '@sentry/node';
33
import type { NodeOptions } from '@sentry/node';
44
import { GLOBAL_OBJ, logger } from '@sentry/utils';
@@ -143,7 +143,7 @@ export function init(options: NodeOptions): void {
143143
}
144144
});
145145

146-
addEventProcessor(
146+
getGlobalScope().addEventProcessor(
147147
Object.assign(
148148
(event => {
149149
if (event.type === 'transaction') {
@@ -207,7 +207,7 @@ export function init(options: NodeOptions): void {
207207
);
208208

209209
if (process.env.NODE_ENV === 'development') {
210-
addEventProcessor(devErrorSymbolicationEventProcessor);
210+
getGlobalScope().addEventProcessor(devErrorSymbolicationEventProcessor);
211211
}
212212

213213
DEBUG_BUILD && logger.log('SDK successfully initialized');

0 commit comments

Comments
 (0)