3

I've created a spring boot app with websocket support, and I would like to expose the WebSocketMessageBrokerStats on the prometheus scrape endpoint provided by acuator.

I'm able to get access to the WebSocketMessageBrokerStats object via autowiring/inject. However, the object only exposes the relevant metrics (number of connected sockets, size of thread pool etc) as a summarized String.

This isn't very useful since I'd ultimately like to export those metrics to a prometheus instance. Is there any way to get access to the stats exposed by the WebSocketMessageBroker stats in their raw form (e.g. as an int or long).

Derek Mok
  • 253
  • 1
  • 7
  • This answer should help: https://stackoverflow.com/questions/32865949/websocketmessagebrokerstats-how-to-set-loggingperiod#answer-34476913 – Halil Mar 27 '20 at 09:47
  • No, @Halil, it wouldn't help.. in mentioned question/answer described how to make endpoint to get statistics, but we want to get stats in number format – NightEagle May 26 '21 at 08:18

0 Answers0