gcp-spanner-query-count
Count queries executed on Google Cloud Spanner databases by filtering instance, database, query type, and status. Analyze query performance over custom time ranges and alignment periods.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
alignmentPeriod | No | Alignment period for aggregating data points (e.g., "60s", "5m", "1h") | 60s |
databaseId | No | Spanner database ID (optional, if not provided will show all databases) | |
endTime | No | End time for the query (defaults to now) | |
instanceId | No | Spanner instance ID (optional, if not provided will show all instances) | |
queryType | No | Type of queries to count (ALL, READ, QUERY) | ALL |
startTime | No | Start time for the query (e.g., "1h", "2d", "30m") | 1h |
status | No | Status of queries to count (ALL, OK, ERROR) | ALL |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"alignmentPeriod": {
"default": "60s",
"description": "Alignment period for aggregating data points (e.g., \"60s\", \"5m\", \"1h\")",
"type": "string"
},
"databaseId": {
"description": "Spanner database ID (optional, if not provided will show all databases)",
"type": "string"
},
"endTime": {
"description": "End time for the query (defaults to now)",
"type": "string"
},
"instanceId": {
"description": "Spanner instance ID (optional, if not provided will show all instances)",
"type": "string"
},
"queryType": {
"default": "ALL",
"description": "Type of queries to count (ALL, READ, QUERY)",
"enum": [
"ALL",
"READ",
"QUERY"
],
"type": "string"
},
"startTime": {
"default": "1h",
"description": "Start time for the query (e.g., \"1h\", \"2d\", \"30m\")",
"type": "string"
},
"status": {
"default": "ALL",
"description": "Status of queries to count (ALL, OK, ERROR)",
"enum": [
"ALL",
"OK",
"ERROR"
],
"type": "string"
}
},
"type": "object"
}