There is a way to get the number of client connections from Node.js? #1014
-
I'm trying to build Prometheus metrics abstraction. I can't find a way to retrieve the client sockets connections count from uws application. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
App.filter lets you count them |
Beta Was this translation helpful? Give feedback.
-
I upgraded to the latest version, and the filter worked, but there is a problem when the client ends the websocket connection (for example, closes the browser window) the callback is not called with a count value of -1, nothing is called, only the app close handler. But the filter for HTTP connections works fine, I'm receiving both counts 1, -1. |
Beta Was this translation helpful? Give feedback.
I upgraded to the latest version, and the filter worked, but there is a problem when the client ends the websocket connection (for example, closes the browser window) the callback is not called with a count value of -1, nothing is called, only the app close handler. But the filter for HTTP connections works fine, I'm receiving both counts 1, -1.