hypothesis / h

Annotate with anyone, anywhere.
https://hypothes.is/
BSD 2-Clause "Simplified" License
2.96k stars 427 forks source link

Provide insight into WebSocket usage volume #6236

Closed robertknight closed 4 years ago

robertknight commented 4 years ago

Following on from https://github.com/hypothesis/h/issues/6192, we want to get a better understanding of the volume of activity / usage that the WebSocket server is currently seeing, which will provide us with a baseline to help plan for future growth.

Metrics that would be useful to have:

  1. The total number of active WebSocket connections
  2. The total volume of events of different types that were processed by the WebSocket server in the last N minutes. We might be able to leverage CloudAMQP's dashboard for this
  3. The total number of notifications of different types that got delivered to connected clients
  4. The current latency (mean, nth-percentile etc.) between when events are added to the message queue and when WebSocket notifications get delivered to clients
jon-betts commented 4 years ago

Some random ideas (if they are easy):

robertknight commented 4 years ago

Initial metrics about the number of active connections has been added. See the merged PRs mentioned in https://github.com/hypothesis/h/pull/6246 (this PR itself was not merged).

We don't have metrics about end-to-end latency yet.

robertknight commented 4 years ago

I'm going to close this now since we have basic WS connection volume metrics in place, which is the most important requirement. We can look at adding others later as needed.