Skip to content

[+] improve recommendation metrics, #764#921

Merged
pashagolub merged 5 commits intomasterfrom
764_improve_reco_metrics
Sep 1, 2025
Merged

[+] improve recommendation metrics, #764#921
pashagolub merged 5 commits intomasterfrom
764_improve_reco_metrics

Conversation

@pashagolub
Copy link
Collaborator

Refactor PostgreSQL recommendation metrics to consolidate multiple
findings per metric type.

The changes consolidate all 8 recommendation metrics to use
an aggregation pattern that combines multiple database objects into
comma-separated strings instead of separate rows, limiting results to
50 items with overflow indicators, and actionable guidance templates
were added to extra_info fields.

@pashagolub pashagolub self-assigned this Aug 30, 2025
@pashagolub pashagolub added dashboards Grafana dashboards related metrics Metrics related issues refactoring Something done as it should've been done from the start labels Aug 30, 2025
@pashagolub pashagolub added this to the Grafana v12 milestone Aug 30, 2025
@coveralls
Copy link

coveralls commented Aug 30, 2025

Pull Request Test Coverage Report for Build 17376181939

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 64.095%

Totals Coverage Status
Change from base Build 17375443908: 0.0%
Covered Lines: 3215
Relevant Lines: 5016

💛 - Coveralls

Refactor PostgreSQL recommendation metrics to consolidate multiple
findings per metric type.

The changes consolidate all 8 recommendation metrics to use
an aggregation pattern that combines multiple database objects into
comma-separated strings instead of separate rows, limiting results to
50 items with overflow indicators, and actionable guidance templates
were added to extra_info fields.
@pashagolub pashagolub force-pushed the 764_improve_reco_metrics branch from b141233 to 10cf4c4 Compare September 1, 2025 11:15
Latest versions of pg_qualstats return not only CREATE INDEX but
affected queries array. So use CREATE INDEX as is in recommendations,
and output `queryids` if available in `extra_info`.

Due to long recommendation text limit concatenated output to 10 items.
Reported by @0xgouda.
@pashagolub pashagolub merged commit a2f3154 into master Sep 1, 2025
9 checks passed
@pashagolub pashagolub deleted the 764_improve_reco_metrics branch September 1, 2025 11:31
pashagolub added a commit that referenced this pull request Sep 1, 2025
* [+] improve recommendation metrics, closes #764

Refactor PostgreSQL recommendation metrics to consolidate multiple
findings per metric type.

The changes consolidate all 8 recommendation metrics to use
an aggregation pattern that combines multiple database objects into
comma-separated strings instead of separate rows, limiting results to
50 items with overflow indicators, and actionable guidance templates
were added to extra_info fields.

* [-] fix `metric_storage_name` properties in YAML, fixes #920

* [+] improve "Recommendations" dashboard

* [-] fix object name aggregation by @0xgouda

* [-] tweak recommendations for `reco_add_index` metric

Latest versions of pg_qualstats return not only CREATE INDEX but
affected queries array. So use CREATE INDEX as is in recommendations,
and output `queryids` if available in `extra_info`.

Due to long recommendation text limit concatenated output to 10 items.
Reported by @0xgouda.

------

Co-authored-by: Ahmed Gouda <gouda0x@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dashboards Grafana dashboards related metrics Metrics related issues refactoring Something done as it should've been done from the start

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants