Skip to content

Commit

Permalink
Add table stats to Google Cloud Spanner receiver
Browse files Browse the repository at this point in the history
to track size/etc
  • Loading branch information
artemvovk committed Feb 15, 2023
1 parent 789e904 commit 235d57f
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 235d57f

Please sign in to comment.