From fc1cb8f7d625b4aae6e1208e6cfa6ce3147a58c3 Mon Sep 17 00:00:00 2001 From: Mikhail Grigorev Date: Tue, 26 Nov 2024 13:06:47 +0500 Subject: [PATCH] Remove underscores --- internal/collector/postgres_conflicts.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/internal/collector/postgres_conflicts.go b/internal/collector/postgres_conflicts.go index a0c70d6..bf12f28 100644 --- a/internal/collector/postgres_conflicts.go +++ b/internal/collector/postgres_conflicts.go @@ -56,7 +56,7 @@ func (c *postgresConflictsCollector) Update(config Config, ch chan<- prometheus. ch <- c.conflicts.newConstMetric(stat.snapshot, stat.database, "snapshot") ch <- c.conflicts.newConstMetric(stat.bufferpin, stat.database, "bufferpin") ch <- c.conflicts.newConstMetric(stat.deadlock, stat.database, "deadlock") - ch <- c.conflicts.newConstMetric(stat.active_logicalslot, stat.database, "active_logicalslot") + ch <- c.conflicts.newConstMetric(stat.activeLogicalslot, stat.database, "active_logicalslot") } return nil @@ -64,13 +64,13 @@ func (c *postgresConflictsCollector) Update(config Config, ch chan<- prometheus. // postgresConflictStat represents per-database recovery conflicts stats based on pg_stat_database_conflicts. type postgresConflictStat struct { - database string - tablespace float64 - lock float64 - snapshot float64 - bufferpin float64 - deadlock float64 - active_logicalslot float64 + database string + tablespace float64 + lock float64 + snapshot float64 + bufferpin float64 + deadlock float64 + activeLogicalslot float64 } // parsePostgresDatabasesStats parses PGResult, extract data and return struct with stats values. @@ -131,7 +131,7 @@ func parsePostgresConflictStats(r *model.PGResult, labelNames []string) map[stri case "confl_deadlock": s.deadlock = v case "confl_active_logicalslot": - s.active_logicalslot = v + s.activeLogicalslot = v default: continue }