Skip to content

PMM-13899 pull upstream changes v0.17.1 #311

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 56 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
94b0651
Update common Prometheus files (#951)
prombot Nov 15, 2023
f0ea016
Update common Prometheus files (#963)
prombot Nov 23, 2023
ae1375b
pg_replication_slot: add slot type label (#960)
shamil Nov 23, 2023
34f5443
Bump github.com/prometheus/common from 0.44.0 to 0.45.0 (#948)
dependabot[bot] Nov 23, 2023
5ceae7f
Bump github.com/prometheus/client_model (#949)
dependabot[bot] Nov 24, 2023
f5b613a
pg_stat_database: added support for `active_time` counter (#961)
sitole Nov 28, 2023
825cc8a
Bump golang.org/x/crypto from 0.14.0 to 0.17.0 (#988)
dependabot[bot] Dec 21, 2023
9cfa132
Bump github.com/prometheus/client_golang from 1.17.0 to 1.18.0 (#993)
dependabot[bot] Jan 2, 2024
f98834a
use Info level for excluded databases log message (#1003)
keegancsmith Feb 14, 2024
8f39f5b
Add connection limits metrics for pg_roles and pg_database (#997)
jocelynthode Feb 22, 2024
838f09c
Bump github.com/DATA-DOG/go-sqlmock from 1.5.0 to 1.5.2 (#1000)
dependabot[bot] Feb 22, 2024
89087f1
Bump github.com/prometheus/client_golang from 1.18.0 to 1.19.0 (#1011)
dependabot[bot] Mar 6, 2024
b126e62
Bump github.com/prometheus/client_model from 0.5.0 to 0.6.0 (#1010)
dependabot[bot] Mar 6, 2024
5ffc58c
Bump google.golang.org/protobuf from 1.32.0 to 1.33.0 (#1014)
dependabot[bot] Mar 14, 2024
ddd5136
Bump github.com/prometheus/exporter-toolkit from 0.10.0 to 0.11.0 (#992)
dependabot[bot] Mar 14, 2024
cc0fd2e
Bump golang.org/x/net from 0.20.0 to 0.23.0 (#1021)
dependabot[bot] Apr 21, 2024
a4ac0e6
feat: Add safe_wal_size and wal_status to replication_slot (#1027)
MarcWort May 11, 2024
49f66e1
fix: Only query active_time on pg>=14 (#1045)
MarcWort Jun 25, 2024
3c5ef40
Update README.md (#1038)
fhackenberger Jul 6, 2024
98f75c7
stop logging errors on replicas, fixes #547 (#1048)
saz Sep 5, 2024
3be4edc
Update common Prometheus files (#983)
prombot Oct 17, 2024
3743987
Update common Prometheus files (#1076)
prombot Oct 26, 2024
e854076
chore!: adopt log/slog, drop go-kit/log (#1073)
tjhop Oct 26, 2024
071ebb6
Bump github.com/prometheus/client_golang from 1.20.4 to 1.20.5 (#1079)
dependabot[bot] Oct 26, 2024
f9c7457
Bump github.com/prometheus/common from 0.60.0 to 0.60.1 (#1080)
dependabot[bot] Oct 27, 2024
552ff92
Make walreceiver collector useful w/o repmgr (#1086)
bitfehler Nov 6, 2024
c52405a
Update common Prometheus files (#1083)
prombot Nov 6, 2024
340a104
Bump github.com/prometheus/exporter-toolkit from 0.13.0 to 0.13.1 (#1…
dependabot[bot] Nov 6, 2024
0045c4f
Update common Prometheus files (#1087)
prombot Nov 8, 2024
4abdfa5
Update changelog and version for a v0.16.0 release (#1088)
sysadmind Nov 10, 2024
a324fe3
Fix version header in changelog (#1089)
sysadmind Nov 10, 2024
6f36adf
Update pg_long_running_transactions.go (#1092)
jyothikirant-sayukth Dec 22, 2024
5bb1702
Fix to replace dashes with underscore in the metric names (#1103)
aagarwalla-fx Dec 22, 2024
5145620
Bump github.com/prometheus/exporter-toolkit from 0.13.1 to 0.13.2 (#1…
dependabot[bot] Jan 1, 2025
bea2609
Checkpoint related columns in PG 17 have been moved from pg_stat_bgwr…
n-rodriguez Jan 1, 2025
ecb5ec5
Update common Prometheus files (#1090)
prombot Jan 7, 2025
9de4f19
Update common Prometheus files (#1110)
prombot Jan 7, 2025
7d4c278
Add Postgres 17 for CI test (#1105)
khiemdoan Jan 13, 2025
3acc479
Bump github.com/prometheus/common from 0.61.0 to 0.62.0 (#1118)
dependabot[bot] Feb 13, 2025
d85a771
Update common Prometheus files (#1124)
prombot Feb 14, 2025
072864d
pg_stat_statements PG17 (#1114)
NevermindZ4 Feb 15, 2025
9e42fc0
fix: handle pg_replication_slots on pg<13 (#1098)
michael-todorovic Feb 15, 2025
2ee2a8f
feat: add wait/backend to pg_stat_activity (#1106)
fgalind1 Feb 15, 2025
c3885e8
Export last replay age in replication collector (#1085)
bitfehler Feb 15, 2025
99e1b51
Bump github.com/prometheus/exporter-toolkit from 0.13.2 to 0.14.0 (#1…
dependabot[bot] Feb 15, 2025
4c170ed
Fix missing dsn sanitization for logging (#1104)
sysadmind Feb 15, 2025
8bb1a41
Skip pg_stat_checkpointer collector if pg<17 (#1112)
n-rodriguez Feb 20, 2025
51006ab
Prep for v0.17 (#1127)
sysadmind Feb 21, 2025
2869087
Fix: Handle incoming labels with invalid UTF-8 (#1131)
vancwo Feb 26, 2025
1e574cf
Release v0.17.1 (#1132)
SuperQ Feb 26, 2025
8bd733e
Merge tag 'v0.17.1' into PMM-7-pull-upstream-changes-v0.17.1
BupycHuk Mar 24, 2025
78dbb76
PMM-7 pull upstream changes from v0.17.1
BupycHuk Mar 24, 2025
5bf4bfc
PMM-7 Fix build
BupycHuk Mar 24, 2025
9667c22
PMM-7 Fix build
BupycHuk Mar 24, 2025
f4c8a85
PMM-7 Remove unused dependencies from go.mod and go.sum
BupycHuk Mar 24, 2025
30e3790
PMM-7 Add "plugin" label to pg_replication_slot metrics
BupycHuk Mar 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update pg_long_running_transactions.go (prometheus-community#1092)
To extract time in seconds for pg_long_running_transactions_oldest_timestamp_seconds query which currently return epoch time.

Signed-off-by: Jyothi Kiran Thammana <[email protected]>
  • Loading branch information
jyothikirant-sayukth authored Dec 22, 2024
commit 6f36adfadfcc51f8e1b92f8cd5fceb0289d73ccc
12 changes: 7 additions & 5 deletions collector/pg_long_running_transactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,13 @@ var (
)

longRunningTransactionsQuery = `
SELECT
COUNT(*) as transactions,
MAX(EXTRACT(EPOCH FROM clock_timestamp())) AS oldest_timestamp_seconds
FROM pg_catalog.pg_stat_activity
WHERE state is distinct from 'idle' AND query not like 'autovacuum:%'
SELECT
COUNT(*) as transactions,
MAX(EXTRACT(EPOCH FROM clock_timestamp() - pg_stat_activity.xact_start)) AS oldest_timestamp_seconds
FROM pg_catalog.pg_stat_activity
WHERE state IS DISTINCT FROM 'idle'
AND query NOT LIKE 'autovacuum:%'
AND pg_stat_activity.xact_start IS NOT NULL;
`
)

Expand Down