rabbitmq / rabbitmq-stomp

RabbitMQ STOMP plugin
https://www.rabbitmq.com/stomp.html
Other
49 stars 28 forks source link

Notify reductions, garbage_collection, recv_oct and send_oct in the core metrics #102

Closed dcorbacho closed 7 years ago

dcorbacho commented 7 years ago

Several STOMP metrics are missing in the management database. recv_oct, send_oct are notified using rabbit_core_metrics:connection_stats/2 which treats them as raw metrics and doesn't calculate stats. rabbit_core_metrics:connection_stats/4 is needed to convert them to calculated stats. reductions and garbage_collection info are also missing.

Stats should be notified as in rabbit_reader.erl

The same as https://github.com/rabbitmq/rabbitmq-mqtt/issues/121

dcorbacho commented 7 years ago

None of the STOMP stats are correctly notified, as it is using none as connection pid because of a bug in the processor, which takes the connection from the empty initial state. This causes a single entry on the core stats, which cannot be associated to any connection, as the key for all entries is always none.

The CLI command list_stomp_connections in master is also affected showing up none for all pids.

It will be fixed here.

dcorbacho commented 7 years ago

The lack of stats and potential leak (similar to https://github.com/rabbitmq/rabbitmq-mqtt/issues/117) affects also releases previous to 3.6.7