@@ -8,12 +8,12 @@ test('Should report an error event for errors thrown in getServerSideProps', asy
8
8
9
9
const transactionEventPromise = waitForTransaction ( 'nextjs-13' , transactionEvent => {
10
10
return (
11
- transactionEvent . transaction === '/error-getServerSideProps' &&
11
+ transactionEvent . transaction === 'GET /[param] /error-getServerSideProps' &&
12
12
transactionEvent . contexts ?. trace ?. op === 'http.server'
13
13
) ;
14
14
} ) ;
15
15
16
- await page . goto ( '/error-getServerSideProps' ) ;
16
+ await page . goto ( '/dogsaregreat/ error-getServerSideProps' ) ;
17
17
18
18
expect ( await errorEventPromise ) . toMatchObject ( {
19
19
contexts : {
@@ -40,7 +40,7 @@ test('Should report an error event for errors thrown in getServerSideProps', asy
40
40
url : expect . stringMatching ( / ^ h t t p .* \/ e r r o r - g e t S e r v e r S i d e P r o p s / ) ,
41
41
} ,
42
42
timestamp : expect . any ( Number ) ,
43
- transaction : 'getServerSideProps (/error-getServerSideProps)' ,
43
+ transaction : 'getServerSideProps (/[param]/ error-getServerSideProps)' ,
44
44
} ) ;
45
45
46
46
expect ( await transactionEventPromise ) . toMatchObject ( {
@@ -60,11 +60,11 @@ test('Should report an error event for errors thrown in getServerSideProps', asy
60
60
data : {
61
61
'http.response.status_code' : 500 ,
62
62
'sentry.op' : 'http.server' ,
63
- 'sentry.origin' : 'auto.function.nextjs ' ,
63
+ 'sentry.origin' : 'auto' ,
64
64
'sentry.source' : 'route' ,
65
65
} ,
66
66
op : 'http.server' ,
67
- origin : 'auto.function.nextjs ' ,
67
+ origin : 'auto' ,
68
68
span_id : expect . any ( String ) ,
69
69
status : 'internal_error' ,
70
70
trace_id : expect . any ( String ) ,
@@ -80,7 +80,7 @@ test('Should report an error event for errors thrown in getServerSideProps', asy
80
80
} ,
81
81
start_timestamp : expect . any ( Number ) ,
82
82
timestamp : expect . any ( Number ) ,
83
- transaction : '/error-getServerSideProps' ,
83
+ transaction : 'GET /[param] /error-getServerSideProps' ,
84
84
transaction_info : { source : 'route' } ,
85
85
type : 'transaction' ,
86
86
} ) ;
@@ -95,11 +95,12 @@ test('Should report an error event for errors thrown in getServerSideProps in pa
95
95
96
96
const transactionEventPromise = waitForTransaction ( 'nextjs-13' , transactionEvent => {
97
97
return (
98
- transactionEvent . transaction === '/customPageExtension' && transactionEvent . contexts ?. trace ?. op === 'http.server'
98
+ transactionEvent . transaction === 'GET /[param]/customPageExtension' &&
99
+ transactionEvent . contexts ?. trace ?. op === 'http.server'
99
100
) ;
100
101
} ) ;
101
102
102
- await page . goto ( '/customPageExtension' ) ;
103
+ await page . goto ( '/123/ customPageExtension' ) ;
103
104
104
105
expect ( await errorEventPromise ) . toMatchObject ( {
105
106
contexts : {
@@ -126,7 +127,7 @@ test('Should report an error event for errors thrown in getServerSideProps in pa
126
127
url : expect . stringMatching ( / ^ h t t p .* \/ c u s t o m P a g e E x t e n s i o n / ) ,
127
128
} ,
128
129
timestamp : expect . any ( Number ) ,
129
- transaction : 'getServerSideProps (/customPageExtension)' ,
130
+ transaction : 'getServerSideProps (/[param]/ customPageExtension)' ,
130
131
} ) ;
131
132
132
133
expect ( await transactionEventPromise ) . toMatchObject ( {
@@ -146,11 +147,11 @@ test('Should report an error event for errors thrown in getServerSideProps in pa
146
147
data : {
147
148
'http.response.status_code' : 500 ,
148
149
'sentry.op' : 'http.server' ,
149
- 'sentry.origin' : 'auto.function.nextjs ' ,
150
+ 'sentry.origin' : 'auto' ,
150
151
'sentry.source' : 'route' ,
151
152
} ,
152
153
op : 'http.server' ,
153
- origin : 'auto.function.nextjs ' ,
154
+ origin : 'auto' ,
154
155
span_id : expect . any ( String ) ,
155
156
status : 'internal_error' ,
156
157
trace_id : expect . any ( String ) ,
@@ -166,7 +167,7 @@ test('Should report an error event for errors thrown in getServerSideProps in pa
166
167
} ,
167
168
start_timestamp : expect . any ( Number ) ,
168
169
timestamp : expect . any ( Number ) ,
169
- transaction : '/customPageExtension' ,
170
+ transaction : 'GET /[param] /customPageExtension' ,
170
171
transaction_info : { source : 'route' } ,
171
172
type : 'transaction' ,
172
173
} ) ;
0 commit comments