Prior to this commit, the `WebSocketMessageBrokerStats` would be in charge of periodically logging WebSocket stats. This class would also publicly expose each stats type with dedicated methods, as `String`. This would not allow observation libraries to easily extract information and turn them into metrics. This commit introduces new methods exposing the `Stats` types directly and deprecates the former `String` variants. This will allow observability libraries like Micrometer to expose this as metrics: ``` MeterRegistry meterRegistry = ...; Gauge.builder("spring.stomp.frames", stats.getStompSubProtocolStats(), StompSubProtocolHandler.Stats::getTotalConnect) .tag("type", "CONNECT") .description("number of CONNECT frames processed") .register(meterRegistry); ``` Closes gh-31604 |
||
---|---|---|
.. | ||
src | ||
spring-websocket.gradle |