Skip to content

Commit

Permalink
rename pings
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisCarriere committed Oct 4, 2023
1 parent 8c32443 commit 9fcfa87
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ Bun.serve<{key: string}>({
// ping
// https://developers.binance.com/docs/binance-trading-api/websocket_api#test-connectivity
if ( method === "ping" ) {
prometheus.total_pings.inc(1);
prometheus.pings.inc(1);
console.log('ping', {key: ws.data.key, remoteAddress: ws.remoteAddress});
ws.send(JSON.stringify({id, status: 200, result: {}}));
return;
Expand Down
2 changes: 1 addition & 1 deletion src/prometheus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ export const connected = registerCounter('connected', 'Total connected clients')
export const published_messages = registerCounter('published_messages', 'Total published messages');
export const bytes_published = registerCounter('bytes_published', 'Total bytes published');
export const disconnects = registerCounter('disconnects', 'Total disconnects');
export const total_pings = registerCounter('total_pings', 'Total pings');
export const pings = registerCounter('pings', 'Total pings');

0 comments on commit 9fcfa87

Please sign in to comment.