diff --git a/receiver/googlecloudspannerreceiver/internal/metadataconfig/metadata.yaml b/receiver/googlecloudspannerreceiver/internal/metadataconfig/metadata.yaml index 2cfa0e83408f..3ce1051cb3e7 100644 --- a/receiver/googlecloudspannerreceiver/internal/metadataconfig/metadata.yaml +++ b/receiver/googlecloudspannerreceiver/internal/metadataconfig/metadata.yaml @@ -519,3 +519,22 @@ metadata: data: type: "gauge" unit: "second" +# +# -------------------------------------------- Table Size Stats ------------------------------------------------------ +# + - name: "hourly table sizes stats" + query: "SELECT * FROM SPANNER_SYS.TABLE_SIZES_STATS_1HOUR WHERE INTERVAL_END = @pullTimestamp ORDER BY INTERVAL_END DESC, LOCK_WAIT_SECONDS DESC" + metric_name_prefix: "database/spanner/table_sizes/total/" + timestamp_column_name: "INTERVAL_END" + high_cardinality: true + labels: + - name: "table_name" + column_name: "TABLE_NAME" + value_type: "string" + metrics: + - name: "used_bytes" + column_name: "USED_BYTES" + value_type: "int" + data: + type: "gauge" + unit: "byte"