Stay organized with collectionsSave and categorize content based on your preferences.
This page describes the metrics that you can view in Key Visualizer heatmaps.
Metrics
Key Visualizer automtically captures and aggregates metrics about performance
and resource usage for Spanner databases that have enabled it. All
metrics in Key Visualizer are normalized by the number of rows. This means
that the metric value inside a row range is the aggregated count divided by the
number of rows inside the range.
Metrics
Description
CPU seconds
Number of CPU seconds spent per (wall clock) second reading / writing in a row range.
Logical stored bytes
Bytes used to store data in a row range.
Number of rows read
Number of rows read per second from a row range.
Number of bytes read
Number of bytes read (not bytes returned) per second from a row range.
Number of rows written
Number of rows inserted / updated per second in a row range.
Number of bytes written
Number of bytes inserted / updated per second in a row range.
Time window granularity
Spanner Key Visualizer aggregates metrics at several different
granularities over time. The most recent data is aggregated at the finest
granularity, while earlier data is aggregated more coarsely.
Period
Granularity
Past 6 hours
1 minute
Past 4 days
10 minutes
Past 28 days
1 hour
Data retention and wipeout
Spanner stores key ranges and metrics in an internal metadata table
as part of the user's database. Spanner Key Visualizer data retention
is as follows:
Data that is collected every minute will be deleted after six hours.
Data that is collected every ten minutes will be deleted after four days.
Data that is collected every hour will be deleted after 28 days.
Key Visualizer stores row key data in the metadata table. If your data retention
requirements aren't compatible with Key Visualizer's data retention schedule,
you candisable Key Visualizer.
Limitations
There are some situations in which new data might not be immediately available in
Key Visualizer.
Storage and traffic statistics for newly created databases might not be
available immediately.
Traffic statistics for newly inserted rows might be attributed to existing key
ranges.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Key Visualizer metrics\n\nThis page describes the metrics that you can view in Key Visualizer heatmaps.\n\nMetrics\n-------\n\nKey Visualizer automtically captures and aggregates metrics about performance\nand resource usage for Spanner databases that have enabled it. All\nmetrics in Key Visualizer are normalized by the number of rows. This means\nthat the metric value inside a row range is the aggregated count divided by the\nnumber of rows inside the range.\n\nTime window granularity\n-----------------------\n\nSpanner Key Visualizer aggregates metrics at several different\ngranularities over time. The most recent data is aggregated at the finest\ngranularity, while earlier data is aggregated more coarsely.\n\nData retention and wipeout\n--------------------------\n\nSpanner stores key ranges and metrics in an internal metadata table\nas part of the user's database. Spanner Key Visualizer data retention\nis as follows:\n\n- Data that is collected every minute will be deleted after six hours.\n- Data that is collected every ten minutes will be deleted after four days.\n- Data that is collected every hour will be deleted after 28 days.\n\nKey Visualizer stores row key data in the metadata table. If your data retention\nrequirements aren't compatible with Key Visualizer's data retention schedule,\nyou can\n[disable Key Visualizer](/spanner/docs/key-visualizer/getting-started#enabling_key_visualizer).\n\nLimitations\n-----------\n\nThere are some situations in which new data might not be immediately available in\nKey Visualizer.\n\n- Storage and traffic statistics for newly created databases might not be available immediately.\n- Traffic statistics for newly inserted rows might be attributed to existing key ranges.\n\nWhat's next\n-----------\n\n- [Get started with Key Visualizer](/spanner/docs/key-visualizer/getting-started).\n- Learn [how Key Visualizer displays data in heatmaps](/spanner/docs/key-visualizer/exploring-heatmaps#heatmaps).\n- Find out [how to explore Key Visualizer heatmaps](/spanner/docs/key-visualizer/exploring-heatmaps)."]]