@@ -18,12 +18,12 @@ test('Sends server-side Supabase auth admin `createUser` span', async ({ page, b
1818
1919 expect ( transactionEvent . spans ) . toContainEqual ( {
2020 data : expect . objectContaining ( {
21- " db.operation" : " auth.admin.createUser" ,
22- " db.system" : " postgresql" ,
23- " sentry.op" : "db" ,
24- " sentry.origin" : " auto.db.supabase"
21+ ' db.operation' : ' auth.admin.createUser' ,
22+ ' db.system' : ' postgresql' ,
23+ ' sentry.op' : 'db' ,
24+ ' sentry.origin' : ' auto.db.supabase' ,
2525 } ) ,
26- description : 'createUser' ,
26+ description : 'auth (admin) createUser' ,
2727 op : 'db' ,
2828 parent_span_id : expect . stringMatching ( / [ a - f 0 - 9 ] { 16 } / ) ,
2929 span_id : expect . stringMatching ( / [ a - f 0 - 9 ] { 16 } / ) ,
@@ -59,17 +59,14 @@ test('Sends client-side Supabase db-operation spans and breadcrumbs to Sentry',
5959
6060 expect ( transactionEvent . spans ) . toContainEqual (
6161 expect . objectContaining ( {
62- description : 'from(todos)' ,
62+ description : 'select(*) filter(order, asc) from(todos)' ,
6363 op : 'db' ,
6464 data : expect . objectContaining ( {
65- "db.operation" : "select" ,
66- "db.query" : [
67- "select(*)" ,
68- "filter(order, asc)"
69- ] ,
70- "db.system" : "postgresql" ,
71- "sentry.op" : "db" ,
72- "sentry.origin" : "auto.db.supabase"
65+ 'db.operation' : 'select' ,
66+ 'db.query' : [ 'select(*)' , 'filter(order, asc)' ] ,
67+ 'db.system' : 'postgresql' ,
68+ 'sentry.op' : 'db' ,
69+ 'sentry.origin' : 'auto.db.supabase' ,
7370 } ) ,
7471 parent_span_id : expect . stringMatching ( / [ a - f 0 - 9 ] { 16 } / ) ,
7572 span_id : expect . stringMatching ( / [ a - f 0 - 9 ] { 16 } / ) ,
@@ -83,16 +80,13 @@ test('Sends client-side Supabase db-operation spans and breadcrumbs to Sentry',
8380
8481 expect ( transactionEvent . spans ) . toContainEqual ( {
8582 data : expect . objectContaining ( {
86- "db.operation" : "select" ,
87- "db.query" : [
88- "select(*)" ,
89- "filter(order, asc)"
90- ] ,
91- "db.system" : "postgresql" ,
92- "sentry.op" : "db" ,
93- "sentry.origin" : "auto.db.supabase"
83+ 'db.operation' : 'select' ,
84+ 'db.query' : [ 'select(*)' , 'filter(order, asc)' ] ,
85+ 'db.system' : 'postgresql' ,
86+ 'sentry.op' : 'db' ,
87+ 'sentry.origin' : 'auto.db.supabase' ,
9488 } ) ,
95- description : 'from(todos)' ,
89+ description : 'select(*) filter(order, asc) from(todos)' ,
9690 op : 'db' ,
9791 parent_span_id : expect . stringMatching ( / [ a - f 0 - 9 ] { 16 } / ) ,
9892 span_id : expect . stringMatching ( / [ a - f 0 - 9 ] { 16 } / ) ,
@@ -107,15 +101,15 @@ test('Sends client-side Supabase db-operation spans and breadcrumbs to Sentry',
107101 timestamp : expect . any ( Number ) ,
108102 type : 'supabase' ,
109103 category : 'db.select' ,
110- message : 'from(todos)' ,
104+ message : 'select(*) filter(order, asc) from(todos)' ,
111105 data : expect . any ( Object ) ,
112106 } ) ;
113107
114108 expect ( transactionEvent . breadcrumbs ) . toContainEqual ( {
115109 timestamp : expect . any ( Number ) ,
116110 type : 'supabase' ,
117111 category : 'db.insert' ,
118- message : 'from(todos)' ,
112+ message : 'insert(...) select(*) from(todos)' ,
119113 data : expect . any ( Object ) ,
120114 } ) ;
121115} ) ;
@@ -134,15 +128,13 @@ test('Sends server-side Supabase db-operation spans and breadcrumbs to Sentry',
134128 expect ( transactionEvent . spans ) . toContainEqual (
135129 expect . objectContaining ( {
136130 data : expect . objectContaining ( {
137- "db.operation" : "insert" ,
138- "db.query" : [
139- "select(*)" ,
140- ] ,
141- "db.system" : "postgresql" ,
142- "sentry.op" : "db" ,
143- "sentry.origin" : "auto.db.supabase"
131+ 'db.operation' : 'insert' ,
132+ 'db.query' : [ 'select(*)' ] ,
133+ 'db.system' : 'postgresql' ,
134+ 'sentry.op' : 'db' ,
135+ 'sentry.origin' : 'auto.db.supabase' ,
144136 } ) ,
145- description : 'from(todos)' ,
137+ description : 'insert(...) select(*) from(todos)' ,
146138 op : 'db' ,
147139 parent_span_id : expect . stringMatching ( / [ a - f 0 - 9 ] { 16 } / ) ,
148140 span_id : expect . stringMatching ( / [ a - f 0 - 9 ] { 16 } / ) ,
@@ -156,15 +148,13 @@ test('Sends server-side Supabase db-operation spans and breadcrumbs to Sentry',
156148
157149 expect ( transactionEvent . spans ) . toContainEqual ( {
158150 data : expect . objectContaining ( {
159- "db.operation" : "select" ,
160- "db.query" : [
161- "select(*)" ,
162- ] ,
163- "db.system" : "postgresql" ,
164- "sentry.op" : "db" ,
165- "sentry.origin" : "auto.db.supabase"
151+ 'db.operation' : 'select' ,
152+ 'db.query' : [ 'select(*)' ] ,
153+ 'db.system' : 'postgresql' ,
154+ 'sentry.op' : 'db' ,
155+ 'sentry.origin' : 'auto.db.supabase' ,
166156 } ) ,
167- description : 'from(todos)' ,
157+ description : 'select(*) from(todos)' ,
168158 op : 'db' ,
169159 parent_span_id : expect . stringMatching ( / [ a - f 0 - 9 ] { 16 } / ) ,
170160 span_id : expect . stringMatching ( / [ a - f 0 - 9 ] { 16 } / ) ,
@@ -179,24 +169,23 @@ test('Sends server-side Supabase db-operation spans and breadcrumbs to Sentry',
179169 timestamp : expect . any ( Number ) ,
180170 type : 'supabase' ,
181171 category : 'db.select' ,
182- message : 'from(todos)' ,
172+ message : 'select(*) from(todos)' ,
183173 data : expect . any ( Object ) ,
184174 } ) ;
185175
186176 expect ( transactionEvent . breadcrumbs ) . toContainEqual ( {
187177 timestamp : expect . any ( Number ) ,
188178 type : 'supabase' ,
189179 category : 'db.insert' ,
190- message : 'from(todos)' ,
180+ message : 'insert(...) select(*) from(todos)' ,
191181 data : expect . any ( Object ) ,
192182 } ) ;
193183} ) ;
194184
195185test ( 'Sends server-side Supabase auth admin `listUsers` span' , async ( { page, baseURL } ) => {
196186 const httpTransactionPromise = waitForTransaction ( 'supabase-nextjs' , transactionEvent => {
197187 return (
198- transactionEvent ?. contexts ?. trace ?. op === 'http.server' &&
199- transactionEvent ?. transaction === 'GET /api/list-users'
188+ transactionEvent ?. contexts ?. trace ?. op === 'http.server' && transactionEvent ?. transaction === 'GET /api/list-users'
200189 ) ;
201190 } ) ;
202191
@@ -205,12 +194,12 @@ test('Sends server-side Supabase auth admin `listUsers` span', async ({ page, ba
205194
206195 expect ( transactionEvent . spans ) . toContainEqual ( {
207196 data : expect . objectContaining ( {
208- " db.operation" : " auth.admin.listUsers" ,
209- " db.system" : " postgresql" ,
210- " sentry.op" : "db" ,
211- " sentry.origin" : " auto.db.supabase"
197+ ' db.operation' : ' auth.admin.listUsers' ,
198+ ' db.system' : ' postgresql' ,
199+ ' sentry.op' : 'db' ,
200+ ' sentry.origin' : ' auto.db.supabase' ,
212201 } ) ,
213- description : 'listUsers' ,
202+ description : 'auth (admin) listUsers' ,
214203 op : 'db' ,
215204 parent_span_id : expect . stringMatching ( / [ a - f 0 - 9 ] { 16 } / ) ,
216205 span_id : expect . stringMatching ( / [ a - f 0 - 9 ] { 16 } / ) ,
0 commit comments