feat(database_observability.postgres): Add configurable limit to pg_stat_statements query#5639
Merged
Merged
Conversation
e9665bd to
6e30467
Compare
cristiangreco
commented
Feb 24, 2026
| | Name | Type | Description | Default | Required | | ||
| |--------------------|------------|------------------------------------------------------|---------|----------| | ||
| | `collect_interval` | `duration` | How frequently to collect information from database. | `"1m"` | no | | ||
| | `statements_limit` | `integer` | Max number of recent queries to collect details for. | `100` | no | |
Contributor
Author
There was a problem hiding this comment.
100 matches the default value of postgres_exporter (and our previously hardcoded value)
Contributor
|
💻 Deploy preview deleted (feat(database_observability.postgres): Add configurable limit to |
Contributor
|
Small doc change. No suggestions from my side :-) |
…tat_statements query Allow configuring the number of statements collected from `pg_stat_statements` in the `query_details` collector. This allows (roughly) matching the number of statements set in the exporter.
6e30467 to
8644bc1
Compare
matthewnolf
approved these changes
Mar 13, 2026
clayton-cornell
approved these changes
Mar 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brief description of Pull Request
Allow configuring the number of statements collected from
pg_stat_statementsin thequery_detailscollector. This allows (roughly) matching the number of statements set in the exporter.Pull Request Details
Issue(s) fixed by this Pull Request
Fixes https://github.com/grafana/grafana-dbo11y-app/issues/2414
Notes to the Reviewer
PR Checklist