Grafana dashboard: Google Cloud Spanner - Query details
Description: Query details dashboard


{
  "__inputs": [
    {
      "name": "DS_PROMETHEUS",
      "label": "Prometheus",
      "description": "",
      "type": "datasource",
      "pluginId": "prometheus",
      "pluginName": "Prometheus"
    }
  ],
  "__elements": [],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "8.3.1"
    },
    {
      "type": "datasource",
      "id": "prometheus",
      "name": "Prometheus",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "table",
      "name": "Table",
      "version": ""
    },
    {
      "type": "panel",
      "id": "timeseries",
      "name": "Time series",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "target": {
          "limit": 100,
          "matchAny": false,
          "tags": [],
          "type": "dashboard"
        },
        "type": "dashboard"
      }
    ]
  },
  "description": "Query details dashboard",
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 1,
  "id": null,
  "iteration": 1644345183172,
  "links": [
    {
      "asDropdown": false,
      "icon": "external link",
      "includeVars": true,
      "keepTime": true,
      "tags": [
        "cloud-monitoring-instance"
      ],
      "targetBlank": false,
      "title": "Instance",
      "tooltip": "",
      "type": "dashboards",
      "url": ""
    },
    {
      "asDropdown": false,
      "icon": "external link",
      "includeVars": true,
      "keepTime": true,
      "tags": [
        "cloud-monitoring-database"
      ],
      "targetBlank": false,
      "title": "Database",
      "tooltip": "",
      "type": "dashboards",
      "url": ""
    },
    {
      "asDropdown": false,
      "icon": "external link",
      "includeVars": true,
      "keepTime": true,
      "tags": [
        "query-insights"
      ],
      "targetBlank": false,
      "title": "Query Insights",
      "tooltip": "",
      "type": "dashboards",
      "url": ""
    },
    {
      "asDropdown": false,
      "icon": "external link",
      "includeVars": true,
      "keepTime": true,
      "tags": [
        "lock-insights"
      ],
      "targetBlank": false,
      "title": "Lock Insights",
      "tooltip": "",
      "type": "dashboards",
      "url": ""
    },
    {
      "asDropdown": false,
      "icon": "external link",
      "includeVars": true,
      "keepTime": true,
      "tags": [
        "transaction-insights"
      ],
      "targetBlank": false,
      "title": "Transaction Insights",
      "tooltip": "",
      "type": "dashboards",
      "url": ""
    },
    {
      "asDropdown": false,
      "icon": "external link",
      "includeVars": true,
      "keepTime": true,
      "tags": [
        "active-queries-summary"
      ],
      "targetBlank": false,
      "title": "Active Queries Summary",
      "tooltip": "",
      "type": "dashboards",
      "url": ""
    },
    {
      "asDropdown": false,
      "icon": "external link",
      "includeVars": true,
      "keepTime": true,
      "tags": [
        "read-insights"
      ],
      "targetBlank": false,
      "title": "Read Insights",
      "tooltip": "",
      "type": "dashboards",
      "url": ""
    }
  ],
  "liveNow": false,
  "panels": [
    {
      "datasource": {
        "uid": "${DS_PROMETHEUS}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "always",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "s"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 0
      },
      "id": 12,
      "interval": "60s",
      "options": {
        "legend": {
          "calcs": [
            "mean"
          ],
          "displayMode": "table",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "multi"
        }
      },
      "targets": [
        {
          "exemplar": false,
          "expr": "avg by (project_id,instance_id,database,query_text)(database_spanner_query_stats_top_avg_cpu_seconds{query_text_fingerprint=\"${query_topn}\", database=\"$database\", instance_id=\"$instance\", project_id=\"$project\"})",
          "format": "time_series",
          "hide": false,
          "interval": "",
          "legendFormat": "CPU Usage",
          "refId": "A"
        }
      ],
      "title": "CPU Usage",
      "type": "timeseries"
    },
    {
      "datasource": {
        "uid": "${DS_PROMETHEUS}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "always",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "s"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 0
      },
      "id": 23,
      "interval": "60s",
      "options": {
        "legend": {
          "calcs": [
            "mean"
          ],
          "displayMode": "table",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "multi"
        }
      },
      "targets": [
        {
          "exemplar": false,
          "expr": "avg by (project_id,instance_id,database,query_text)(database_spanner_query_stats_top_avg_latency_seconds{query_text_fingerprint=\"$query_topn\", database=\"$database\", instance_id=\"$instance\", project_id=\"$project\"})",
          "format": "time_series",
          "hide": false,
          "interval": "",
          "legendFormat": "Latency",
          "refId": "A"
        }
      ],
      "title": "Latency",
      "type": "timeseries"
    },
    {
      "datasource": {
        "uid": "${DS_PROMETHEUS}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 8
      },
      "id": 21,
      "interval": "60s",
      "options": {
        "legend": {
          "calcs": [
            "sum"
          ],
          "displayMode": "table",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "multi"
        }
      },
      "targets": [
        {
          "exemplar": false,
          "expr": "sum by (project_id,instance_id,database,query_text) (database_spanner_query_stats_top_execution_count{query_text_fingerprint=\"$query_topn\",database=\"$database\",instance_id=\"$instance\",project_id=\"$project\"})",
          "hide": false,
          "interval": "",
          "legendFormat": "Execution count",
          "refId": "A"
        },
        {
          "exemplar": false,
          "expr": "sum by (project_id,instance_id,database,query_text) (database_spanner_query_stats_top_all_failed_execution_count{query_text_fingerprint=\"$query_topn\",database=\"$database\",instance_id=\"$instance\",project_id=\"$project\"})",
          "hide": false,
          "interval": "",
          "legendFormat": "Failed",
          "refId": "B"
        }
      ],
      "title": "Execution count / Failed",
      "type": "timeseries"
    },
    {
      "datasource": {
        "uid": "${DS_PROMETHEUS}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 8
      },
      "id": 22,
      "interval": "60s",
      "options": {
        "legend": {
          "calcs": [
            "mean"
          ],
          "displayMode": "table",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "multi"
        }
      },
      "targets": [
        {
          "exemplar": false,
          "expr": "avg by (project_id,instance_id,database,query_text)(database_spanner_query_stats_top_avg_rows_scanned{query_text_fingerprint=\"$query_topn\", database=\"$database\",instance_id=\"$instance\",project_id=\"$project\"})",
          "hide": false,
          "interval": "",
          "legendFormat": "Scanned",
          "refId": "A"
        },
        {
          "exemplar": false,
          "expr": "avg by (project_id,instance_id,database,query_text)(database_spanner_query_stats_top_avg_rows{query_text_fingerprint=\"$query_topn\",database=\"$database\",instance_id=\"$instance\",project_id=\"$project\"})",
          "hide": false,
          "interval": "",
          "legendFormat": "Returned",
          "refId": "B"
        }
      ],
      "title": "Rows scanned / Rows returned",
      "type": "timeseries"
    },
    {
      "datasource": {
        "uid": "${DS_PROMETHEUS}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "auto",
            "displayMode": "auto",
            "filterable": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Total CPU Usage"
            },
            "properties": [
              {
                "id": "unit",
                "value": "s"
              },
              {
                "id": "custom.width",
                "value": 124
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Average CPU Usage"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 161
              },
              {
                "id": "unit",
                "value": "s"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Project"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 63
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Instance"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 78
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Database"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 85
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Fingerprint"
            },
            "properties": [
              {
                "id": "unit",
                "value": "string"
              },
              {
                "id": "custom.width",
                "value": 179
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Average Latency"
            },
            "properties": [
              {
                "id": "unit",
                "value": "s"
              },
              {
                "id": "custom.width",
                "value": 123
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Total Latency"
            },
            "properties": [
              {
                "id": "unit",
                "value": "s"
              },
              {
                "id": "custom.width",
                "value": 110
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Average Latency"
            },
            "properties": [
              {
                "id": "unit",
                "value": "s"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Total Execution count"
            },
            "properties": [
              {
                "id": "custom.width"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 8,
        "w": 24,
        "x": 0,
        "y": 16
      },
      "id": 31,
      "interval": "60s",
      "options": {
        "footer": {
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "showHeader": true,
        "sortBy": []
      },
      "pluginVersion": "8.3.1",
      "targets": [
        {
          "exemplar": false,
          "expr": "database_spanner_query_stats_top_avg_latency_seconds{query_text_fingerprint=\"$query_topn\",database=\"$database\", instance_id=\"$instance\",project_id=\"$project\"}",
          "format": "table",
          "instant": false,
          "interval": "",
          "legendFormat": "",
          "queryType": "randomWalk",
          "refId": "A"
        },
        {
          "exemplar": false,
          "expr": "database_spanner_query_stats_top_avg_rows_scanned{query_text_fingerprint=\"$query_topn\",database=\"$database\",instance_id=\"$instance\",project_id=\"$project\"}",
          "format": "table",
          "hide": false,
          "instant": false,
          "interval": "",
          "legendFormat": "",
          "refId": "B"
        },
        {
          "exemplar": false,
          "expr": "database_spanner_query_stats_top_execution_count{query_text_fingerprint=\"$query_topn\",database=\"$database\", instance_id=\"$instance\",project_id=\"$project\"}",
          "format": "table",
          "hide": false,
          "interval": "",
          "legendFormat": "",
          "refId": "C"
        },
        {
          "exemplar": false,
          "expr": "database_spanner_query_stats_top_avg_cpu_seconds{query_text_fingerprint=\"$query_topn\",database=\"$database\", instance_id=\"$instance\",project_id=\"$project\"}",
          "format": "table",
          "hide": false,
          "instant": false,
          "interval": "",
          "legendFormat": "",
          "queryType": "randomWalk",
          "refId": "D"
        }
      ],
      "title": "Summary",
      "transformations": [
        {
          "id": "filterFieldsByName",
          "options": {
            "include": {
              "names": [
                "Time",
                "database",
                "instance_id",
                "project_id",
                "query_text",
                "query_text_fingerprint",
                "query_text_truncated",
                "Value #A",
                "Value #B",
                "Value #C",
                "Value #D",
                "request_tag"
              ]
            }
          }
        },
        {
          "id": "merge",
          "options": {}
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "Time": false,
              "database": false,
              "instance": true,
              "instance_id": false,
              "job": true,
              "project": true,
              "project_id": false,
              "query_text_fingerprint": false,
              "query_text_truncated": true
            },
            "indexByName": {
              "Time": 0,
              "Value #A": 8,
              "Value #B": 9,
              "Value #C": 10,
              "Value #D": 7,
              "database": 3,
              "instance_id": 2,
              "project_id": 1,
              "query_text": 6,
              "query_text_fingerprint": 4,
              "request_tag": 5
            },
            "renameByName": {
              "Time": "Time",
              "Value #A": "Latency",
              "Value #B": "Rows scanned",
              "Value #C": "Execution count",
              "Value #D": "CPU Usage",
              "database": "Database",
              "instance": "",
              "instance_id": "Instance",
              "project_id": "Project",
              "query_text": "Query",
              "query_text_fingerprint": "Fingerprint",
              "request_tag": "Tag"
            }
          }
        },
        {
          "id": "groupBy",
          "options": {
            "fields": {
              "CPU Usage": {
                "aggregations": [
                  "last"
                ],
                "operation": "aggregate"
              },
              "Database": {
                "aggregations": [],
                "operation": "groupby"
              },
              "Execution count": {
                "aggregations": [
                  "last"
                ],
                "operation": "aggregate"
              },
              "Fingerprint": {
                "aggregations": [],
                "operation": "groupby"
              },
              "Instance": {
                "aggregations": [],
                "operation": "groupby"
              },
              "Latency": {
                "aggregations": [
                  "last"
                ],
                "operation": "aggregate"
              },
              "Project": {
                "aggregations": [],
                "operation": "groupby"
              },
              "Query": {
                "aggregations": [],
                "operation": "groupby"
              },
              "Query fingerprint": {
                "aggregations": [],
                "operation": "groupby"
              },
              "Rows scanned": {
                "aggregations": [
                  "last"
                ],
                "operation": "aggregate"
              },
              "Tag": {
                "aggregations": [],
                "operation": "groupby"
              },
              "Time": {
                "aggregations": [],
                "operation": "groupby"
              }
            }
          }
        },
        {
          "id": "calculateField",
          "options": {
            "alias": "Total Latency",
            "binary": {
              "left": "Latency (last)",
              "operator": "*",
              "reducer": "sum",
              "right": "Execution count (last)"
            },
            "mode": "binary",
            "reduce": {
              "reducer": "sum"
            }
          }
        },
        {
          "id": "calculateField",
          "options": {
            "alias": "Total CPU Usage",
            "binary": {
              "left": "CPU Usage (last)",
              "operator": "*",
              "reducer": "sum",
              "right": "Execution count (last)"
            },
            "mode": "binary",
            "reduce": {
              "reducer": "sum"
            }
          }
        },
        {
          "id": "calculateField",
          "options": {
            "alias": "Total Rows scanned",
            "binary": {
              "left": "Rows scanned (last)",
              "operator": "*",
              "reducer": "sum",
              "right": "Execution count (last)"
            },
            "mode": "binary",
            "reduce": {
              "reducer": "sum"
            }
          }
        },
        {
          "id": "groupBy",
          "options": {
            "fields": {
              "Database": {
                "aggregations": [],
                "operation": "groupby"
              },
              "Execution count (last)": {
                "aggregations": [
                  "sum"
                ],
                "operation": "aggregate"
              },
              "Fingerprint": {
                "aggregations": [],
                "operation": "groupby"
              },
              "Instance": {
                "aggregations": [],
                "operation": "groupby"
              },
              "Latency (mean)": {
                "aggregations": [
                  "last"
                ],
                "operation": "aggregate"
              },
              "Project": {
                "aggregations": [],
                "operation": "groupby"
              },
              "Query": {
                "aggregations": [],
                "operation": "groupby"
              },
              "Rows scanned (last)": {
                "aggregations": [
                  "mean"
                ]
              },
              "Rows scanned (mean)": {
                "aggregations": [
                  "last"
                ],
                "operation": "aggregate"
              },
              "Tag": {
                "aggregations": [],
                "operation": "groupby"
              },
              "Total CPU Usage": {
                "aggregations": [
                  "sum"
                ],
                "operation": "aggregate"
              },
              "Total Latency": {
                "aggregations": [
                  "sum"
                ],
                "operation": "aggregate"
              },
              "Total Rows scanned": {
                "aggregations": [
                  "sum"
                ],
                "operation": "aggregate"
              }
            }
          }
        },
        {
          "id": "calculateField",
          "options": {
            "alias": "Average CPU Usage",
            "binary": {
              "left": "Total CPU Usage (sum)",
              "operator": "/",
              "reducer": "sum",
              "right": "Execution count (last) (sum)"
            },
            "mode": "binary",
            "reduce": {
              "reducer": "sum"
            }
          }
        },
        {
          "id": "calculateField",
          "options": {
            "alias": "Average Latency",
            "binary": {
              "left": "Total Latency (sum)",
              "operator": "/",
              "reducer": "sum",
              "right": "Execution count (last) (sum)"
            },
            "mode": "binary",
            "reduce": {
              "reducer": "sum"
            }
          }
        },
        {
          "id": "calculateField",
          "options": {
            "alias": "Average Rows scanned",
            "binary": {
              "left": "Total Rows scanned (sum)",
              "operator": "/",
              "reducer": "sum",
              "right": "Execution count (last) (sum)"
            },
            "mode": "binary",
            "reduce": {
              "reducer": "sum"
            }
          }
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "Database": true,
              "Instance": true,
              "Project": true,
              "Total Rows scanned (sum)": true
            },
            "indexByName": {
              "Average CPU Usage": 7,
              "Average Latency": 9,
              "Database": 2,
              "Execution count (last) (sum)": 10,
              "Fingerprint": 3,
              "Instance": 1,
              "Project": 0,
              "Query": 4,
              "Rows scanned (last) (mean)": 11,
              "Tag": 5,
              "Total CPU Usage (sum)": 6,
              "Total Latency (sum)": 8
            },
            "renameByName": {
              "Average CPU Usage": "",
              "Average Latency": "",
              "Execution count (last) (sum)": "Total Execution count",
              "Latency (mean) (last)": "Average Latency",
              "Rows scanned (last) (mean)": "Average Rows scanned",
              "Rows scanned (last) (sum)": "Rowas scanned",
              "Rows scanned (mean) (last)": "Average Rows scanned",
              "Tag": "",
              "Total CPU Usage (sum)": "Total CPU Usage",
              "Total Latency (sum)": "Total Latency"
            }
          }
        }
      ],
      "type": "table"
    }
  ],
  "refresh": "1m",
  "schemaVersion": 33,
  "style": "dark",
  "tags": [
    "query-details"
  ],
  "templating": {
    "list": [
      {
        "current": {
          "selected": false,
          "text": "Prometheus",
          "value": "Prometheus"
        },
        "description": "Prometheus data source",
        "hide": 0,
        "includeAll": false,
        "label": "Prometheus",
        "multi": false,
        "name": "pds",
        "options": [],
        "query": "prometheus",
        "queryValue": "",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "type": "datasource"
      },
      {
        "allValue": ".*",
        "current": {},
        "datasource": {
          "uid": "${DS_PROMETHEUS}"
        },
        "definition": "label_values(project_id)",
        "hide": 0,
        "includeAll": false,
        "label": "Project",
        "multi": false,
        "name": "project",
        "options": [],
        "query": {
          "query": "label_values(project_id)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "type": "query"
      },
      {
        "allValue": ".*",
        "current": {},
        "datasource": {
          "uid": "${DS_PROMETHEUS}"
        },
        "definition": "label_values(instance_id)",
        "hide": 0,
        "includeAll": false,
        "label": "Instance",
        "multi": false,
        "name": "instance",
        "options": [],
        "query": {
          "query": "label_values(instance_id)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "type": "query"
      },
      {
        "allValue": ".*",
        "current": {},
        "datasource": {
          "uid": "${DS_PROMETHEUS}"
        },
        "definition": "label_values(database)",
        "hide": 0,
        "includeAll": false,
        "label": "Database",
        "multi": false,
        "name": "database",
        "options": [],
        "query": {
          "query": "label_values(database)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "type": "query"
      },
      {
        "current": {},
        "datasource": {
          "uid": "${DS_PROMETHEUS}"
        },
        "definition": "query_result(topk(10, avg_over_time(database_spanner_query_stats_top_avg_cpu_seconds[${__range_s}s])))",
        "hide": 0,
        "includeAll": false,
        "label": "Top 10 Queries",
        "multi": false,
        "name": "query_topn",
        "options": [],
        "query": {
          "query": "query_result(topk(10, avg_over_time(database_spanner_query_stats_top_avg_cpu_seconds[${__range_s}s])))",
          "refId": "StandardVariableQuery"
        },
        "refresh": 2,
        "regex": "/query_text=\"(?<text>[^\"]+)|query_text_fingerprint=\"(?<value>[^\"]+)/g",
        "skipUrlSync": false,
        "sort": 1,
        "type": "query"
      }
    ]
  },
  "time": {
    "from": "now-1h",
    "to": "now"
  },
  "timepicker": {},
  "timezone": "",
  "title": "Google Cloud Spanner - Query details",
  "uid": "cRMUiFvny",
  "version": 1,
  "weekStart": "",
  "gnetId": 15720
}