Enhance metric alerts observability#8232
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces new Prometheus gauges to track enabled rules and query groups split by whether they use filters, along with corresponding panels in the Grafana dashboard. It also optimizes filter condition parsing during rule evaluation and adds more granular span attributes to tracing spans. The review feedback points out a violation of the repository style guide, as the pull request modifies services and dashboards but is missing a changeset for the hive scope.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
🐋 This PR was built and pushed to the following Docker images: Targets: Platforms: Image Tags: |
This PR adds observability to the metric-alert evaluator without changing evaluation behavior. It attaches rule-intent attributes to the
evaluate-groupspan (metric and threshold types, whether a saved filter is applied, and whether the query fetched the previous window or percentile columns) so a slow trace is identifiable in TraceQL without reading the rawdb.query.On the Metric Alerts dashboard it adds two panels tracking the filtered-vs-unfiltered rule and group population over time, and surfaces the cost-driver attributes as columns on the existing "Slow target groups" trace table so we can see why a given group is slow.