|
1 | | -import { addTracingExtensions, applySdkMetadata, getClient } from '@sentry/core'; |
| 1 | +import { addEventProcessor, addTracingExtensions, applySdkMetadata, getClient, setTag } from '@sentry/core'; |
2 | 2 | import type { NodeOptions } from '@sentry/node'; |
3 | | -import { |
4 | | - Integrations as OriginalIntegrations, |
5 | | - getCurrentScope, |
6 | | - getDefaultIntegrations, |
7 | | - init as nodeInit, |
8 | | -} from '@sentry/node'; |
| 3 | +import { Integrations as OriginalIntegrations, getDefaultIntegrations, init as nodeInit } from '@sentry/node'; |
9 | 4 | import type { EventProcessor } from '@sentry/types'; |
10 | 5 | import { logger } from '@sentry/utils'; |
11 | 6 |
|
@@ -120,16 +115,15 @@ export function init(options: NodeOptions): void { |
120 | 115 |
|
121 | 116 | filterTransactions.id = 'NextServer404TransactionFilter'; |
122 | 117 |
|
123 | | - const scope = getCurrentScope(); |
124 | | - scope.setTag('runtime', 'node'); |
| 118 | + setTag('runtime', 'node'); |
125 | 119 | if (IS_VERCEL) { |
126 | | - scope.setTag('vercel', true); |
| 120 | + setTag('vercel', true); |
127 | 121 | } |
128 | 122 |
|
129 | | - scope.addEventProcessor(filterTransactions); |
| 123 | + addEventProcessor(filterTransactions); |
130 | 124 |
|
131 | 125 | if (process.env.NODE_ENV === 'development') { |
132 | | - scope.addEventProcessor(devErrorSymbolicationEventProcessor); |
| 126 | + addEventProcessor(devErrorSymbolicationEventProcessor); |
133 | 127 | } |
134 | 128 |
|
135 | 129 | DEBUG_BUILD && logger.log('SDK successfully initialized'); |
|
0 commit comments