Skip to content
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

fix streaming metrics export #23519

Merged
merged 1 commit into from
Feb 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 9 additions & 9 deletions streaming/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -856,15 +856,15 @@ const startWorker = async (workerId) => {
res.write('# TYPE connected_channels gauge\n');
res.write('# HELP connected_channels The number of Redis channels the streaming server is subscribed to\n');
res.write(`connected_channels ${Object.keys(subs).length}.0\n`);
res.write('# TYPE pg.pool.total_connections gauge \n');
res.write('# HELP pg.pool.total_connections The total number of clients existing within the pool\n');
res.write(`pg.pool.total_connections ${pgPool.totalCount}.0\n`);
res.write('# TYPE pg.pool.idle_connections gauge \n');
res.write('# HELP pg.pool.idle_connections The number of clients which are not checked out but are currently idle in the pool\n');
res.write(`pg.pool.idle_connections ${pgPool.idleCount}.0\n`);
res.write('# TYPE pg.pool.waiting_queries gauge \n');
res.write('# HELP pg.pool.waiting_queries The number of queued requests waiting on a client when all clients are checked out\n');
res.write(`pg.pool.waiting_queries ${pgPool.waitingCount}.0\n`);
res.write('# TYPE pg_pool_total_connections gauge \n');
res.write('# HELP pg_pool_total_connections The total number of clients existing within the pool\n');
res.write(`pg_pool_total_connections ${pgPool.totalCount}.0\n`);
res.write('# TYPE pg_pool_idle_connections gauge \n');
res.write('# HELP pg_pool_idle_connections The number of clients which are not checked out but are currently idle in the pool\n');
res.write(`pg_pool_idle_connections ${pgPool.idleCount}.0\n`);
res.write('# TYPE pg_pool_waiting_queries gauge \n');
res.write('# HELP pg_pool_waiting_queries The number of queued requests waiting on a client when all clients are checked out\n');
res.write(`pg_pool_waiting_queries ${pgPool.waitingCount}.0\n`);
res.write('# EOF\n');
res.end();
}));
Expand Down