Motivation
Currently, Reactor Netty provides metrics support for HTTP client/server interactions, but WebSocket client connections lack similar observability and metrics support. This makes it difficult to monitor and troubleshoot WebSocket connection lifecycles, message throughput, error rates, and latencies in production environments.
Desired solution
Introduce built-in metrics collection for Reactor Netty WebSocket clients, similar to what is available for HTTP clients (MicrometerHttpMetricsRecorder). Like metrics for,
- WebSocket connection open/close count.
- Connection duration.
- Send/receive message counts and rates
- Bytes sent/received per connection.
Metrics should be consistent with existing Micrometer integration and maybe follow OpenTelemetry semantic conventions. (if and when they come up)
Considered alternatives
- Manually instrumenting each WebSocket client with
doOnConnect, doOnError, doOnNext, etc., but this is error-prone and inconsistent.
Motivation
Currently, Reactor Netty provides metrics support for HTTP client/server interactions, but WebSocket client connections lack similar observability and metrics support. This makes it difficult to monitor and troubleshoot WebSocket connection lifecycles, message throughput, error rates, and latencies in production environments.
Desired solution
Introduce built-in metrics collection for Reactor Netty WebSocket clients, similar to what is available for HTTP clients (
MicrometerHttpMetricsRecorder). Like metrics for,Metrics should be consistent with existing Micrometer integration and maybe follow OpenTelemetry semantic conventions. (if and when they come up)
Considered alternatives
doOnConnect,doOnError,doOnNext, etc., but this is error-prone and inconsistent.