Repository navigation
Conversation
sd2k
left a comment
There was a problem hiding this comment.
Thanks for trimming these. A few notes inline: mostly about diagnostics that got dropped along the way, plus test coverage.
One point that falls outside the diff: generatePanelQueryHints in tools/run_panel_query.go is a separate empty-result hint generator. It still returns the long multi-line Prometheus/Loki guidance, so run_panel_query doesn't benefit from this change, and its wording now differs from query_prometheus/query_loki_logs. It might be worth having it reuse GenerateEmptyResultHints so there's only one source.
|
cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit d2166dc. Configure here.
What this changes
Shorten generic empty-result guidance for Prometheus and Loki while preserving discovery-tool pointers, time-range advice, scrape target health, query-specific hints and debugging metadata.
run_panel_querynow reuses the same Prometheus/Loki generator while retaining its existing hints array and query preview.The generic serialized hints shrink from 615 to 356 bytes for Prometheus and from 614 to 343 bytes for Loki, excluding optional debug metadata. Tests enforce a 400-byte budget for these two generic cases and a separate 650-byte allowance for representative query-specific guidance. Other datasource hint generators remain outside this PR's scope.
up{job="..."}and a generic Loki filter cause that also covers labels filtered after a parser.Related to #1279, specifically item 2. Cause detection and machine-readable reasons remain follow-up work.
How you tested it
go test -tags unit ./...on Windows with Go 1.26.9.No live datasource or Docker integration tests were rerun for this response-text change. Validation used canonical LF checkout content to avoid the existing Windows CRLF README comparison failure.
Checklist