mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-14 08:52:56 +00:00
Track application_name in connection_counts metric
It will help us understand what applications are exhausting the number of direct database connections. Signed-off-by: Tristan Partin <tristan@neon.tech>
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
help: 'Connection counts',
|
||||
key_labels: [
|
||||
'datname',
|
||||
'application_name',
|
||||
'state',
|
||||
],
|
||||
values: [
|
||||
|
||||
@@ -1 +1 @@
|
||||
SELECT datname, state, count(*) AS count FROM pg_stat_activity WHERE state <> '' GROUP BY datname, state;
|
||||
SELECT datname, application_name, state, count(*) AS count FROM pg_stat_activity WHERE state <> '' GROUP BY datname, state;
|
||||
|
||||
Reference in New Issue
Block a user