Skip to content

fix(collector): add value_type: double to ccp_stat_checkpointer_sync_time#4515

Open
Korel wants to merge 1 commit into
CrunchyData:mainfrom
prokube:fix/collector
Open

fix(collector): add value_type: double to ccp_stat_checkpointer_sync_time#4515
Korel wants to merge 1 commit into
CrunchyData:mainfrom
prokube:fix/collector

Conversation

@Korel

@Korel Korel commented Jun 11, 2026

Copy link
Copy Markdown

Checklist:

  • Have you added an explanation of what your changes do and why you'd like them to be included?
  • Have you updated or added documentation for the change, as applicable?
  • Have you tested your changes on all related environments with successful results, as applicable?
    • Have you added automated tests?

Type of Changes:

  • New feature
  • Bug fix
  • Documentation
  • Testing enhancement
  • Other

What is the current behavior (link to any open issues here)?
Fixes #4514.

pg_stat_checkpointer.sync_time metric definition is missing value_type: double, which results in error below:

error converting to integer: strconv.Atoi: parsing "2.774625e+06": invalid syntax

What is the new behavior (if this is a feature change)?

  • Breaking change (fix or feature that would cause existing functionality to change)

ccp_stat_checkpointer_sync_time metric is declared value_type: double in 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_time description and the sync_time metric type is confirmed at docs for PostgreSQL 16, PostgreSQL 17, and PostgreSQL 18.

…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OTel collector metric ccp_stat_checkpointer_sync_time missing value_type: double -> "Error scraping metrics" every collection interval

1 participant