File tree Expand file tree Collapse file tree 3 files changed +17
-8
lines changed
dev-packages/e2e-tests/test-applications
packages/nextjs/src/server Expand file tree Collapse file tree 3 files changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,10 @@ export function register() {
9
9
tracesSampleRate : 1.0 ,
10
10
sendDefaultPii : true ,
11
11
debug : true ,
12
+ transportOptions : {
13
+ // We are doing a lot of events at once in this test
14
+ bufferSize : 1000 ,
15
+ } ,
12
16
} ) ;
13
17
}
14
18
}
Original file line number Diff line number Diff line change @@ -9,6 +9,10 @@ export function register() {
9
9
tracesSampleRate : 1.0 ,
10
10
sendDefaultPii : true ,
11
11
debug : true ,
12
+ transportOptions : {
13
+ // We are doing a lot of events at once in this test
14
+ bufferSize : 1000 ,
15
+ } ,
12
16
} ) ;
13
17
}
14
18
}
Original file line number Diff line number Diff line change @@ -115,22 +115,23 @@ export function init(options: NodeOptions): void {
115
115
116
116
const filterLowQualityTransactions : EventProcessor = event => {
117
117
if ( event . type === 'transaction' ) {
118
- /** This function filters transactions for requests to the Next.js static assets as those requests lead to a lot of noise in the Sentry dashboard.
119
- * By setting the next.config.js options `basePath` and `assetPrefix`, the path to the static assets might be changed.
120
- * This regex matches the default path to the static assets (`_next/static`) and could potentially filter out too many transactions.
121
- */
122
- if ( event . transaction ?. match ( / G E T \/ _ n e x t \/ s t a t i c \/ .* / ) ) {
118
+ // Filter out transactions for static assets
119
+ // This regex matches the default path to the static assets (`_next/static`) and could potentially filter out too many transactions.
120
+ // We match `/_next/static/` anywhere in the transaction name because its location may change with the basePath setting.
121
+ if ( event . transaction ?. match ( / ^ G E T ( \/ .* ) ? \/ _ n e x t \/ s t a t i c \/ / ) ) {
123
122
return null ;
124
123
}
125
124
125
+ // Filter out transactions for requests to the tunnel route
126
126
if (
127
127
globalWithInjectedValues . __sentryRewritesTunnelPath__ &&
128
128
event . transaction === `POST ${ globalWithInjectedValues . __sentryRewritesTunnelPath__ } `
129
129
) {
130
- // Filter out transactions for requests to the tunnel route
131
130
return null ;
132
- } else if ( event . transaction ?. match ( / \/ _ _ n e x t j s _ o r i g i n a l - s t a c k - f r a m e / ) ) {
133
- // Filter out requests to resolve source maps for stack frames in dev mode
131
+ }
132
+
133
+ // Filter out requests to resolve source maps for stack frames in dev mode
134
+ if ( event . transaction ?. match ( / \/ _ _ n e x t j s _ o r i g i n a l - s t a c k - f r a m e / ) ) {
134
135
return null ;
135
136
}
136
137
You can’t perform that action at this time.
0 commit comments