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.
pgwatch sets lock_timeout to 100ms during metric collection, which causes the monitoring to report 100ms instead of the actual configured value. This fix queries reset_val from pg_settings for lock_timeout to get the genuine configuration value.
Closes #61
Note
Report the actual lock_timeout by using reset_val in the settings metric and add unit/integration tests to verify it.
config/pgwatch-prometheus/metrics.yml):reset_valinstead ofsettingforlock_timeout(documented in description) and apply the same CASE logic fornumeric_value.tests/settings/test_settings_metric.pywith unit tests ensuring the SQL/description changes and an integration test validatinglock_timeoutreturns the reset value despite session overrides.Written by Cursor Bugbot for commit 7891edc. Configure here.