microsoft / microsoft/AzureMonitorCommunity
Wait Stats (database) query is busted - 'summarize' operator: Failed to resolve scalar expression named 'wait_type_s'
Open
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 1.2k
- Forks
- 493
- PR merge metrics
- No merged PRs in 30d
Description
The below query throws an error that it failed to resolve wait_type_s. I don't see it in the list of returned fields.
// Wait stats
// Wait stats over the last hour, by Logical Server and Database.
AzureDiagnostics
| where ResourceProvider == "MICROSOFT.SQL"
| where TimeGenerated >= ago(60min)
| parse _ResourceId with * "/microsoft.sql/servers/" LogicalServerName "/databases/" DatabaseName
| summarize Total_count_60mins = sum(delta_waiting_tasks_count_d) by LogicalServerName, DatabaseName, wait_type_s
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Wait stats query shown in issue #207 and verify the AzureDiagnostics fields returned for the selected time range and SQL resources. Compare those fields with the summarize expression, then confirm the corrected query runs without the unresolved wait_type_s error and produces wait statistics grouped by logical server and database.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure
- Domain
- cloud, databases, observability-sre
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100