Commit Graph

7 Commits

Author SHA1 Message Date
Alexander J. Maidak
69c4119e19 Collect idle_in_transaction_time from PG >= 15
idle_in_transaction_time was added to pg_stat_database in pg 15

Signed-off-by: Alexander J. Maidak <amaidak@equinix.com>
2024-10-17 13:15:04 -05:00
Marc W
49f66e1bfb
fix: Only query active_time on pg>=14 (#1045)
Signed-off-by: MarcWort <113890636+MarcWort@users.noreply.github.com>
2024-06-25 09:15:21 -04:00
Jiri Sveceny
f5b613aba7
pg_stat_database: added support for active_time counter (#961)
* feat(pg_stat_database): active time metric

---------

Signed-off-by: Jiri Sveceny <jiri.sveceny@icloud.com>
2023-11-28 15:12:07 +01:00
Felix Yuan
2402783205
Bugfix: Make statsreset nullable (#877)
* Stats_reset as null seems to actually be legitimate for new databases,
so don't fail for it

---------

Signed-off-by: Felix Yuan <felix.yuan@reddit.com>
Co-authored-by: Ben Kochie <superq@gmail.com>
2023-08-24 09:51:26 +02:00
Felix Yuan
12c12cf368 Add a logger to stat_database collector to get better handle on error
(also clean up some metric validity checks)

Signed-off-by: Felix Yuan <felix.yuan@reddit.com>
2023-07-19 14:26:41 -07:00
Daniel Swarbrick
2477aba363
Fix untyped integer overflows on 32-bit archs (#857)
go-sqlmock's Rows.AddRow() takes values which have a type alias of
"any", and appear to default to untyped ints if not explicitly cast.
When large values are passed which would overflow int32, tests fail.

Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
2023-07-05 15:10:47 +02:00
Felix Yuan
8d087f2c64
Bug fix: Make collector not fail on null values (#823)
* Make all values nullable

---------

Signed-off-by: Felix Yuan <felix.yuan@reddit.com>
Co-authored-by: Ben Kochie <superq@gmail.com>
2023-06-27 08:07:59 +02:00