@@ -45,7 +45,7 @@ func (r *DataReader) QueryRelationships(ctx context.Context, tenantID string, fi
4545 ctx , span := tracer .Start (ctx , "data-reader.query-relationships" )
4646 defer span .End ()
4747
48- slog .Info ( "Querying relationships for tenantID: " , slog .String ("tenant_id" , tenantID ))
48+ slog .Debug ( "querying relationships for tenant_id " , slog .String ("tenant_id" , tenantID ))
4949
5050 // Decode the snapshot value.
5151 var st token.SnapToken
@@ -78,7 +78,7 @@ func (r *DataReader) QueryRelationships(ctx context.Context, tenantID string, fi
7878 return nil , utils .HandleError (span , err , base .ErrorCode_ERROR_CODE_SQL_BUILDER )
7979 }
8080
81- slog .Debug ("Generated SQL query: " , slog .String ("query" , query ), "with args" , slog .Any ("arguments" , args ))
81+ slog .Debug ("generated sql query" , slog .String ("query" , query ), "with args" , slog .Any ("arguments" , args ))
8282
8383 // Execute the SQL query and retrieve the result rows.
8484 var rows * sql.Rows
@@ -108,7 +108,7 @@ func (r *DataReader) QueryRelationships(ctx context.Context, tenantID string, fi
108108 return nil , utils .HandleError (span , err , base .ErrorCode_ERROR_CODE_EXECUTION )
109109 }
110110
111- slog .Info ( "Successfully retrieved relation tuples from the database. " )
111+ slog .Debug ( "successfully retrieved relation tuples from the database" )
112112
113113 // Return a TupleIterator created from the TupleCollection.
114114 return collection .CreateTupleIterator (), nil
@@ -120,7 +120,7 @@ func (r *DataReader) ReadRelationships(ctx context.Context, tenantID string, fil
120120 ctx , span := tracer .Start (ctx , "data-reader.read-relationships" )
121121 defer span .End ()
122122
123- slog .Info ( "Reading relationships for tenantID: " , slog .String ("tenant_id" , tenantID ))
123+ slog .Debug ( "reading relationships for tenant_id " , slog .String ("tenant_id" , tenantID ))
124124
125125 // Decode the snapshot value.
126126 var st token.SnapToken
@@ -170,7 +170,7 @@ func (r *DataReader) ReadRelationships(ctx context.Context, tenantID string, fil
170170 return nil , database .NewNoopContinuousToken ().Encode (), utils .HandleError (span , err , base .ErrorCode_ERROR_CODE_SQL_BUILDER )
171171 }
172172
173- slog .Debug ("Generated SQL query: " , slog .String ("query" , query ), "with args" , slog .Any ("arguments" , args ))
173+ slog .Debug ("generated sql query" , slog .String ("query" , query ), "with args" , slog .Any ("arguments" , args ))
174174
175175 // Execute the query and retrieve the rows.
176176 var rows * sql.Rows
@@ -204,7 +204,7 @@ func (r *DataReader) ReadRelationships(ctx context.Context, tenantID string, fil
204204 return nil , nil , utils .HandleError (span , err , base .ErrorCode_ERROR_CODE_EXECUTION )
205205 }
206206
207- slog .Info ( "Successfully read relation tuples from database. " )
207+ slog .Debug ( "successfully read relation tuples from database" )
208208
209209 // Return the results and encoded continuous token for pagination.
210210 if len (tuples ) > int (pagination .PageSize ()) {
@@ -219,7 +219,8 @@ func (r *DataReader) QuerySingleAttribute(ctx context.Context, tenantID string,
219219 // Start a new trace span and end it when the function exits.
220220 ctx , span := tracer .Start (ctx , "data-reader.query-single-attribute" )
221221 defer span .End ()
222- slog .Info ("Querying single attribute for tenantID: " , slog .String ("tenant_id" , tenantID ))
222+
223+ slog .Debug ("querying single attribute for tenant_id" , slog .String ("tenant_id" , tenantID ))
223224
224225 // Decode the snapshot value.
225226 var st token.SnapToken
@@ -252,7 +253,7 @@ func (r *DataReader) QuerySingleAttribute(ctx context.Context, tenantID string,
252253 return nil , utils .HandleError (span , err , base .ErrorCode_ERROR_CODE_SQL_BUILDER )
253254 }
254255
255- slog .Debug ("Generated SQL query: " , slog .String ("query" , query ), "with args" , slog .Any ("arguments" , args ))
256+ slog .Debug ("generated sql query" , slog .String ("query" , query ), "with args" , slog .Any ("arguments" , args ))
256257
257258 row := tx .QueryRowContext (ctx , query , args ... )
258259
@@ -285,7 +286,7 @@ func (r *DataReader) QuerySingleAttribute(ctx context.Context, tenantID string,
285286 return nil , utils .HandleError (span , err , base .ErrorCode_ERROR_CODE_EXECUTION )
286287 }
287288
288- slog .Info ( "Successfully retrieved Single attribute from the database. " )
289+ slog .Debug ( "successfully retrieved Single attribute from the database" )
289290
290291 return rt .ToAttribute (), nil
291292}
@@ -296,7 +297,7 @@ func (r *DataReader) QueryAttributes(ctx context.Context, tenantID string, filte
296297 ctx , span := tracer .Start (ctx , "data-reader.query-attributes" )
297298 defer span .End ()
298299
299- slog .Info ( "Querying Attributes for tenantID: " , slog .String ("tenant_id" , tenantID ))
300+ slog .Debug ( "querying Attributes for tenant_id " , slog .String ("tenant_id" , tenantID ))
300301
301302 // Decode the snapshot value.
302303 var st token.SnapToken
@@ -329,7 +330,7 @@ func (r *DataReader) QueryAttributes(ctx context.Context, tenantID string, filte
329330 return nil , utils .HandleError (span , err , base .ErrorCode_ERROR_CODE_SQL_BUILDER )
330331 }
331332
332- slog .Debug ("Generated SQL query: " , slog .String ("query" , query ), "with args" , slog .Any ("arguments" , args ))
333+ slog .Debug ("generated sql query" , slog .String ("query" , query ), "with args" , slog .Any ("arguments" , args ))
333334
334335 // Execute the SQL query and retrieve the result rows.
335336 var rows * sql.Rows
@@ -373,7 +374,7 @@ func (r *DataReader) QueryAttributes(ctx context.Context, tenantID string, filte
373374 return nil , utils .HandleError (span , err , base .ErrorCode_ERROR_CODE_EXECUTION )
374375 }
375376
376- slog .Info ( "Successfully retrieved attributes tuples from the database. " )
377+ slog .Debug ( "successfully retrieved attributes tuples from the database" )
377378
378379 // Return a TupleIterator created from the TupleCollection.
379380 return collection .CreateAttributeIterator (), nil
@@ -385,7 +386,7 @@ func (r *DataReader) ReadAttributes(ctx context.Context, tenantID string, filter
385386 ctx , span := tracer .Start (ctx , "data-reader.read-attributes" )
386387 defer span .End ()
387388
388- slog .Info ( "Reading attributes for tenantID: " , slog .String ("tenant_id" , tenantID ))
389+ slog .Debug ( "reading attributes for tenant_id " , slog .String ("tenant_id" , tenantID ))
389390
390391 // Decode the snapshot value.
391392 var st token.SnapToken
@@ -435,7 +436,7 @@ func (r *DataReader) ReadAttributes(ctx context.Context, tenantID string, filter
435436 return nil , database .NewNoopContinuousToken ().Encode (), utils .HandleError (span , err , base .ErrorCode_ERROR_CODE_SQL_BUILDER )
436437 }
437438
438- slog .Debug ("Generated SQL query: " , slog .String ("query" , query ), "with args" , slog .Any ("arguments" , args ))
439+ slog .Debug ("generated sql query" , slog .String ("query" , query ), "with args" , slog .Any ("arguments" , args ))
439440
440441 // Execute the query and retrieve the rows.
441442 var rows * sql.Rows
@@ -483,7 +484,7 @@ func (r *DataReader) ReadAttributes(ctx context.Context, tenantID string, filter
483484 return nil , nil , utils .HandleError (span , err , base .ErrorCode_ERROR_CODE_EXECUTION )
484485 }
485486
486- slog .Info ( "Successfully read attributes from the database. " )
487+ slog .Debug ( "successfully read attributes from the database" )
487488
488489 // Return the results and encoded continuous token for pagination.
489490 if len (attributes ) > int (pagination .PageSize ()) {
@@ -499,6 +500,8 @@ func (r *DataReader) QueryUniqueEntities(ctx context.Context, tenantID, name, sn
499500 ctx , span := tracer .Start (ctx , "data-reader.query-unique-entities" )
500501 defer span .End ()
501502
503+ slog .Debug ("querying unique entities for tenant_id" , slog .String ("tenant_id" , tenantID ))
504+
502505 // Decode the snapshot value.
503506 var st token.SnapToken
504507 st , err = snapshot.EncodedToken {Value : snap }.Decode ()
@@ -538,6 +541,8 @@ func (r *DataReader) QueryUniqueEntities(ctx context.Context, tenantID, name, sn
538541 // Append ORDER BY and LIMIT clauses.
539542 query = fmt .Sprintf ("%s ORDER BY id LIMIT %d" , query , pagination .PageSize ()+ 1 )
540543
544+ slog .Debug ("generated sql query" , slog .String ("query" , query ))
545+
541546 // Execute the query and retrieve the rows.
542547 var rows * sql.Rows
543548 rows , err = tx .QueryContext (ctx , query )
@@ -571,6 +576,8 @@ func (r *DataReader) QueryUniqueEntities(ctx context.Context, tenantID, name, sn
571576 return nil , nil , utils .HandleError (span , err , base .ErrorCode_ERROR_CODE_EXECUTION )
572577 }
573578
579+ slog .Debug ("successfully retrieved unique entities from the database" )
580+
574581 // Return the results and encoded continuous token for pagination.
575582 if len (entityIDs ) > int (pagination .PageSize ()) {
576583 return entityIDs [:pagination .PageSize ()], utils .NewContinuousToken (strconv .FormatUint (lastID , 10 )).Encode (), nil
@@ -585,7 +592,7 @@ func (r *DataReader) QueryUniqueSubjectReferences(ctx context.Context, tenantID
585592 ctx , span := tracer .Start (ctx , "data-reader.query-unique-subject-reference" )
586593 defer span .End ()
587594
588- slog .Info ( "Querying unique subject references for tenantID: " , slog .String ("tenant_id" , tenantID ))
595+ slog .Debug ( "querying unique subject references for tenant_id " , slog .String ("tenant_id" , tenantID ))
589596
590597 // Decode the snapshot value.
591598 var st token.SnapToken
@@ -639,7 +646,7 @@ func (r *DataReader) QueryUniqueSubjectReferences(ctx context.Context, tenantID
639646 return nil , database .NewNoopContinuousToken ().Encode (), utils .HandleError (span , err , base .ErrorCode_ERROR_CODE_SQL_BUILDER )
640647 }
641648
642- slog .Debug ("Generated SQL query: " , slog .String ("query" , query ), "with args" , slog .Any ("arguments" , args ))
649+ slog .Debug ("generated sql query" , slog .String ("query" , query ), "with args" , slog .Any ("arguments" , args ))
643650
644651 // Execute the query and retrieve the rows.
645652 var rows * sql.Rows
@@ -672,7 +679,7 @@ func (r *DataReader) QueryUniqueSubjectReferences(ctx context.Context, tenantID
672679 return nil , nil , utils .HandleError (span , err , base .ErrorCode_ERROR_CODE_EXECUTION )
673680 }
674681
675- slog .Info ( "Successfully retrieved unique subject references from the database. " )
682+ slog .Debug ( "successfully retrieved unique subject references from the database" )
676683
677684 // Return the results and encoded continuous token for pagination.
678685 if len (subjectIDs ) > int (pagination .PageSize ()) {
@@ -688,7 +695,7 @@ func (r *DataReader) HeadSnapshot(ctx context.Context, tenantID string) (token.S
688695 ctx , span := tracer .Start (ctx , "data-reader.head-snapshot" )
689696 defer span .End ()
690697
691- slog .Info ( "Getting head snapshot for tenantID: " , slog .String ("tenant_id" , tenantID ))
698+ slog .Debug ( "getting head snapshot for tenant_id " , slog .String ("tenant_id" , tenantID ))
692699
693700 var xid types.XID8
694701
@@ -709,7 +716,7 @@ func (r *DataReader) HeadSnapshot(ctx context.Context, tenantID string) (token.S
709716 return nil , utils .HandleError (span , err , base .ErrorCode_ERROR_CODE_SCAN )
710717 }
711718
712- slog .Info ( "Successfully retrieved latest snapshot token" )
719+ slog .Debug ( "successfully retrieved latest snapshot token" )
713720
714721 // Return the latest snapshot token associated with the tenant.
715722 return snapshot.Token {Value : xid }, nil
0 commit comments