Repository navigation
[-] fix pooler metrics missing from Prometheus sink - #1605
Merged
Merged
Conversation
Coverage Report for CI Build 38902039285Warning No base build found for commit Coverage: 89.629%Details
Uncovered Changes
Coverage RegressionsRequires a base build to compare against. How to fix this → Coverage Stats
💛 - Coveralls |
PgBouncer and Pgpool admin consoles cannot alias columns, so label columns never got the `tag_` prefix and numeric values arrived as `pgtype.Numeric` or text. The reaper now normalizes rows from these sources: known label columns become `tag_*` text, everything else float64; NULLs and unconvertible values are dropped. `pgbouncer_stats` and `pgpool_stats` are no longer excluded from the Prometheus sink. `pgbouncer_clients` and `pgpool_processes` stay excluded because of per-connection label cardinality. v13 Postgres dashboards read the moved columns from `tag_data`. Closes #1571
Rows written before the upgrade keep pooler labels in `data`, newer ones in `tag_data`. `COALESCE` lets the dashboards render both.
pashagolub
force-pushed
the
fix/pooler-prometheus-1571
branch
from
October 16, 2026 12:39
f2bbd7e to
11621fa
Compare
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.
Closes #1571
Summary
PgBouncer and Pgpool
SHOWcommands cannot alias columns, so the reaper does it for them.metrics.yaml:avg_*ofpgbouncer_statsandlb_weight,replication_delayofpgpool_statsdeclared as gauges.grafana/postgres/v13pooler dashboards read labels asCOALESCE(tag_data->>'x', data->>'x'), so rows written before and after the upgrade both render;last_status_changecolumn removed (text, now dropped).Evidence
/metricshas nopgwatch_pgbouncer_stats_*/pgwatch_pgpool_stats_*samples; with the exclusion removed, values are skipped asunsupported datatype: {102 0 false finite true}.After:
go test ./pkg/reaper/ ./pkg/sinks/ ./pkg/metrics/passes. Not yet verified against live PgBouncer/Pgpool.Merge Danger
Door: two-way
Pooler labels now arrive as
tag_*source columns, so new Postgres-sink rows keep them intag_data. v13 dashboards read both layouts, so neither upgrade nor revert breaks them.Blast Radius: pooler
Only
pgbouncer/pgpoolsources. v12 dashboards are not updated and show no labels for new rows. Pgpool non-numeric text columns (last_status_change,replication_state, ...) are no longer stored;load_balance_nodeshows1/0instead oftrue/false.