1
1
/* eslint-disable @typescript-eslint/no-explicit-any */
2
2
import { captureException , getCurrentHub , startTransaction , withScope } from '@sentry/core' ;
3
- import { Event , Span } from '@sentry/types' ;
3
+ import { Span } from '@sentry/types' ;
4
4
import {
5
5
AddRequestDataToEventOptions ,
6
6
addRequestDataToTransaction ,
@@ -15,10 +15,9 @@ import * as domain from 'domain';
15
15
import * as http from 'http' ;
16
16
17
17
import { NodeClient } from './client' ;
18
- import { addRequestDataToEvent , extractRequestData } from './requestdata' ;
19
- // TODO (v8 / XXX) Remove these imports
18
+ import { extractRequestData } from './requestdata' ;
19
+ // TODO (v8 / XXX) Remove this import
20
20
import type { ParseRequestOptions } from './requestDataDeprecated' ;
21
- import { parseRequest } from './requestDataDeprecated' ;
22
21
import { flush , isAutoSessionTrackingEnabled } from './sdk' ;
23
22
24
23
/**
@@ -164,15 +163,6 @@ export function requestHandler(
164
163
res : http . ServerResponse ,
165
164
next : ( error ?: any ) => void ,
166
165
) : void {
167
- // TODO (v8 / XXX) Remove this shim and just use `addRequestDataToEvent`
168
- let backwardsCompatibleEventProcessor : ( event : Event ) => Event ;
169
- if ( options && 'include' in options ) {
170
- backwardsCompatibleEventProcessor = ( event : Event ) => addRequestDataToEvent ( event , req , options ) ;
171
- } else {
172
- // eslint-disable-next-line deprecation/deprecation
173
- backwardsCompatibleEventProcessor = ( event : Event ) => parseRequest ( event , req , options as ParseRequestOptions ) ;
174
- }
175
-
176
166
if ( options && options . flushTimeout && options . flushTimeout > 0 ) {
177
167
// eslint-disable-next-line @typescript-eslint/unbound-method
178
168
const _end = res . end ;
@@ -195,7 +185,6 @@ export function requestHandler(
195
185
const currentHub = getCurrentHub ( ) ;
196
186
197
187
currentHub . configureScope ( scope => {
198
- scope . addEventProcessor ( backwardsCompatibleEventProcessor ) ;
199
188
scope . setSDKProcessingMetadata ( {
200
189
request : req ,
201
190
// TODO (v8): Stop passing this
0 commit comments