Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spanner Logging of SQL Select Statements

I have turned on both the DATA_READ, DATA_WRITE logtypes but I am not able to see any SQL queries. I have reviewed both the activity page and log views from within the GCP console. Below are the confirmed configurations that are enabled:

auditConfigs: - auditLogConfigs: - logType: DATA_READ - logType: DATA_WRITE service: spanner.googleapis.com

I have launched a query from within GCP console and reviewed the "Data" tab of a table but nothing really shows up in the log as to the columns selected or table. We have also launched a "select" statement from within the API and still do not see any query in the log. Is there a way to see a query and if not, what is the best that can be expected?

like image 590
Dave Avatar asked Oct 16 '25 07:10

Dave


1 Answers

Since you seem to be using sql statements, it seems like you'll want to set audit configs for DATA_READ.

https://cloud.google.com/spanner/docs/audit-logging#audited_operations

like image 156
Reid Hironaga Avatar answered Oct 18 '25 21:10

Reid Hironaga



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!