Code QuizAdvanced

Azure Monitor Alert Query Bug

Spot the time-filter mistake in a Log Analytics KQL query used for an Azure Monitor alert.

Codekusto
// Alert: fire when there are too many HTTP 500s in the last 5 minutes
AppRequests
| where TimeGenerated < ago(5m)
| where ResultCode == "500"
| summarize FailureCount = count() by bin(TimeGenerated, 1m)
| where FailureCount > 10

What is the bug in this Log Analytics alert query?