Adding Prometheus metrics

This commit adds a '/metrics' endpoint in the API that can be exploited by Prometheus.

This endpoint returns:

- the number of connected sockets
- the number of users per room
- common NodeJS and system metrics

WARNING: this endpoint is public right now and should be protected
This commit is contained in:
David Négrier 2020-06-09 11:49:23 +02:00
parent bdb01f3103
commit af6924a27c
6 changed files with 66 additions and 5 deletions

View file

@ -32,6 +32,7 @@
"express": "^4.17.1",
"http-status-codes": "^1.4.0",
"jsonwebtoken": "^8.5.1",
"prom-client": "^12.0.0",
"socket.io": "^2.3.0",
"systeminformation": "^4.26.5",
"ts-node-dev": "^1.0.0-pre.44",