File tree 2 files changed +11
-2
lines changed
2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 1
1
import { captureException , getCurrentHub , startTransaction } from '@sentry/core' ;
2
+ import { addRequestDataToEvent } from '@sentry/node' ;
2
3
import { getActiveTransaction } from '@sentry/tracing' ;
3
4
import { Transaction } from '@sentry/types' ;
4
5
import { fill } from '@sentry/utils' ;
@@ -103,6 +104,16 @@ export function callTracedServerSideDataFetcher<F extends (...args: any[]) => Pr
103
104
const currentScope = getCurrentHub ( ) . getScope ( ) ;
104
105
if ( currentScope ) {
105
106
currentScope . setSpan ( dataFetcherSpan ) ;
107
+ currentScope . addEventProcessor ( event =>
108
+ addRequestDataToEvent ( event , req , {
109
+ include : {
110
+ // When the `transaction` option is set to true, it tries to extract a transaction name from the request
111
+ // object. We don't want this since we already have a high-quality transaction name with a parameterized
112
+ // route. Setting `transaction` to `true` will clobber that transaction name.
113
+ transaction : false ,
114
+ } ,
115
+ } ) ,
116
+ ) ;
106
117
}
107
118
108
119
try {
Original file line number Diff line number Diff line change @@ -11,8 +11,6 @@ export * from '@sentry/react';
11
11
export { nextRouterInstrumentation } from './performance/client' ;
12
12
export { captureUnderscoreErrorException } from './utils/_error' ;
13
13
14
- export { withSentryServerSideGetInitialProps } from './config/wrappers' ;
15
-
16
14
export { Integrations } ;
17
15
18
16
// Previously we expected users to import `BrowserTracing` like this:
You can’t perform that action at this time.
0 commit comments