@@ -39,8 +39,8 @@ type CreateMockSupabaseClientOptions = {
3939 method ?: string ;
4040 url ?: URL | string ;
4141 body ?: unknown ;
42- /** When set, configures the mocked Sentry client's `dataCollection.userInfo `. Omit to leave `getClient` to the test file `beforeEach`. */
43- dataCollectionUserInfo ?: boolean ;
42+ /** When set, configures the mocked Sentry client's `dataCollection.databaseQueryData `. Omit to leave `getClient` to the test file `beforeEach`. */
43+ dataCollectionDatabaseQueryData ?: boolean ;
4444} ;
4545
4646const DEFAULT_MOCK_SUPABASE_REST_URL = 'https://example.supabase.co/rest/v1/todos' ;
@@ -53,9 +53,9 @@ const MOCK_SUPABASE_PII_SCENARIO: Pick<CreateMockSupabaseClientOptions, 'method'
5353} ;
5454
5555function createMockSupabaseClient ( resolveWith : unknown , options ?: CreateMockSupabaseClientOptions ) : unknown {
56- if ( options ?. dataCollectionUserInfo !== undefined ) {
56+ if ( options ?. dataCollectionDatabaseQueryData !== undefined ) {
5757 currentScopesMocks . getClient . mockReturnValue ( {
58- getDataCollectionOptions : ( ) => ( { userInfo : options . dataCollectionUserInfo } ) ,
58+ getDataCollectionOptions : ( ) => ( { databaseQueryData : options . dataCollectionDatabaseQueryData } ) ,
5959 } as any ) ;
6060 }
6161
@@ -237,10 +237,10 @@ describe('Supabase Integration', () => {
237237 vi . restoreAllMocks ( ) ;
238238 } ) ;
239239
240- it ( 'omits db.query, db.body, and breadcrumb query/body when dataCollection.userInfo is false' , async ( ) => {
240+ it ( 'omits db.query, db.body, and breadcrumb query/body when dataCollection.databaseQueryData is false' , async ( ) => {
241241 const client = createMockSupabaseClient (
242242 { status : 200 } ,
243- { ...MOCK_SUPABASE_PII_SCENARIO , dataCollectionUserInfo : false } ,
243+ { ...MOCK_SUPABASE_PII_SCENARIO , dataCollectionDatabaseQueryData : false } ,
244244 ) ;
245245 instrumentSupabaseClient ( client ) ;
246246
@@ -259,10 +259,10 @@ describe('Supabase Integration', () => {
259259 expect ( breadcrumb ) . not . toHaveProperty ( 'data' ) ;
260260 } ) ;
261261
262- it ( 'includes db.query, db.body, and breadcrumb query/body when dataCollection.userInfo is true' , async ( ) => {
262+ it ( 'includes db.query, db.body, and breadcrumb query/body when dataCollection.databaseQueryData is true' , async ( ) => {
263263 const client = createMockSupabaseClient (
264264 { status : 200 } ,
265- { ...MOCK_SUPABASE_PII_SCENARIO , dataCollectionUserInfo : true } ,
265+ { ...MOCK_SUPABASE_PII_SCENARIO , dataCollectionDatabaseQueryData : true } ,
266266 ) ;
267267 instrumentSupabaseClient ( client ) ;
268268
@@ -290,10 +290,10 @@ describe('Supabase Integration', () => {
290290 ) ;
291291 } ) ;
292292
293- it ( 'includes data when sendOperationData option is set, regardless of dataCollection.userInfo ' , async ( ) => {
293+ it ( 'includes data when sendOperationData option is set, regardless of dataCollection.databaseQueryData ' , async ( ) => {
294294 const client = createMockSupabaseClient (
295295 { status : 200 } ,
296- { ...MOCK_SUPABASE_PII_SCENARIO , dataCollectionUserInfo : false } ,
296+ { ...MOCK_SUPABASE_PII_SCENARIO , dataCollectionDatabaseQueryData : false } ,
297297 ) ;
298298 instrumentSupabaseClient ( client , { sendOperationData : true } ) ;
299299
@@ -312,10 +312,10 @@ describe('Supabase Integration', () => {
312312 ) ;
313313 } ) ;
314314
315- it ( 'sendOperationData: false takes precedence over dataCollection.userInfo : true' , async ( ) => {
315+ it ( 'sendOperationData: false takes precedence over dataCollection.databaseQueryData : true' , async ( ) => {
316316 const client = createMockSupabaseClient (
317317 { status : 200 } ,
318- { ...MOCK_SUPABASE_PII_SCENARIO , dataCollectionUserInfo : true } ,
318+ { ...MOCK_SUPABASE_PII_SCENARIO , dataCollectionDatabaseQueryData : true } ,
319319 ) ;
320320 instrumentSupabaseClient ( client , { sendOperationData : false } ) ;
321321
@@ -330,7 +330,7 @@ describe('Supabase Integration', () => {
330330 expect ( spanOptions . attributes [ 'db.body' ] ) . toBeUndefined ( ) ;
331331 } ) ;
332332
333- it ( 'includes data when legacy sendDefaultPii: true is bridged to dataCollection.userInfo ' , async ( ) => {
333+ it ( 'includes data when legacy sendDefaultPii: true is bridged to dataCollection.databaseQueryData ' , async ( ) => {
334334 const resolved = resolveDataCollectionOptions ( { sendDefaultPii : true } ) ;
335335 currentScopesMocks . getClient . mockReturnValue ( {
336336 getDataCollectionOptions : ( ) => resolved ,
@@ -378,7 +378,7 @@ describe('Supabase Integration', () => {
378378 it ( 'omits supabase error context query/body when data collection is off' , async ( ) => {
379379 const client = createMockSupabaseClient (
380380 { status : 400 , error : { message : 'Bad request' , code : '400' } } ,
381- { ...MOCK_SUPABASE_PII_SCENARIO , dataCollectionUserInfo : false } ,
381+ { ...MOCK_SUPABASE_PII_SCENARIO , dataCollectionDatabaseQueryData : false } ,
382382 ) ;
383383 instrumentSupabaseClient ( client ) ;
384384
@@ -417,7 +417,7 @@ describe('Supabase Integration', () => {
417417 method : 'POST' ,
418418 url : 'https://example.supabase.co/rest/v1/todos?columns=' ,
419419 body : [ { title : 'Test Todo' } ] ,
420- dataCollectionUserInfo : true ,
420+ dataCollectionDatabaseQueryData : true ,
421421 } ,
422422 ) ;
423423 instrumentSupabaseClient ( client ) ;
0 commit comments