fix(collector): add value_type: double to ccp_stat_checkpointer_sync_time#4515
Open
Korel wants to merge 1 commit into
Open
fix(collector): add value_type: double to ccp_stat_checkpointer_sync_time#4515Korel wants to merge 1 commit into
Korel wants to merge 1 commit into
Conversation
…time Both pg_stat_checkpointer.write_time and .sync_time are double precision (milliseconds). write_time already had value_type: double; sync_time was missing it. The OTel sqlquery receiver defaults value_type to int, so once cumulative sync_time grows large enough for the driver to render it in scientific notation (e.g. 2.774625e+06), strconv.Atoi fails and the collector logs an "Error scraping metrics" error on every collection interval (every 5s by default). This affects both PG-version variants (gte_pg17 and lt_pg17). The generated JSON artifacts are regenerated to match. Issue: CrunchyData#4514
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Checklist:
Type of Changes:
What is the current behavior (link to any open issues here)?
Fixes #4514.
pg_stat_checkpointer.sync_timemetric definition is missingvalue_type: double, which results in error below:What is the new behavior (if this is a feature change)?
ccp_stat_checkpointer_sync_timemetric is declaredvalue_type: doublein both PG-version variants (gte_pg17 and lt_pg17), so it is parsed as a float and emitted without error. The generated JSON artifacts are regenerated to match.Other Information:
The fix has not been tested on a live cluster yet at the time of PR creation. However it is a one-line change and it matches the sibling metric
write_timedescription and thesync_timemetric type is confirmed at docs for PostgreSQL 16, PostgreSQL 17, and PostgreSQL 18.