Get started with Key Visualizer

This page describes how to use Key Visualizer to check for performance issues that are related to your Firestore in Datastore mode usage patterns.

Before you begin

To use Key Visualizer for Datastore mode, you must enable the Firestore Key Visualizer API.

Enable the API

Roles and permissions

Make sure that your account is granted either of the following IAM roles:

  • Cloud Datastore Owner
  • Cloud Datastore Key Visualizer Viewer
  • Editor
  • Owner

Viewing a scan for a time period

Each Key Visualizer scan covers a two hour period. A scan for a given period is available for databases with traffic that exceeds 3000 document operations in any given minute in that period.

To launch Key Visualizer:

  1. Go to the Firestore in Datastore mode Insights > Key Visualizer page in the Google Cloud console.

    Go to the Key Visualizer page

  2. Select a time span from the available Key Visualizer scans:

    Click the Pencil icon in the upper right. Select a Date and a Time Span. Click Update.

    Scans are available based on scan eligibility. You can't select time spans that did not meet scan eligibility or that are still processing. The two most recent scans of the day will take some time to process before they are available.

  3. Select a metric to analyze:

    Click the metrics dropdown in the upper left and select a metric to view. Key Visualizer opens in the Ops/s metric by default.

To compare metrics or look for data correlations, you can display multiple Key Visualizer metrics together. See Finding connections between different metrics.

Viewing an activity overview

To get an overview of activity during the selected two-hour time period, review the heatmap for the Ops/s metric. This metric measures the number of requests per second for each key range. Ops/s is a sum of write, lookup, and query requests. Key Visualizer shows this metric by default when you open a heatmap.

The following example shows a heatmap where there are major differences in the usage pattern for different key ranges:

  • Ranges shown in dark colors have little or no activity.
  • Ranges in bright colors have significantly more activity.
  • The glowing white range in the middle has very high activity.

Example of a Key Visualizer scan

After getting an idea of the overall activity in your database, you can continue your investigation by looking at other metrics and focusing on key ranges that might be causing problems. Learn more.

What's next