rabbitmq-server
rabbitmq-server copied to clipboard
DO NOT MERGE WIP experiment with Observer CLI plugins
We can write observer_cli
plugins. Here's what that could look like for classic queues.
I see these as shortcuts for us to retrieve information about a system we need to debug, especially for cases where we would need to deal with customers directly and ask them to retrieve information from the Erlang node. But it could be used for any useful information to retrieve from the system.
The hard part moving forward is determining what values are the most useful.
Types of Changes
- [ ] Bug fix (non-breaking change which fixes issue #NNNN)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause an observable behavior change in existing systems)
- [ ] Documentation improvements (corrections, new content, etc)
- [ ] Cosmetic change (whitespace, formatting, etc)
Checklist
- [ ] I have added this change to the first version(s) in release-notes that I expect to introduce it
Example screenshot:

More recent screenshot:

Next steps:
- Wait/Help with https://github.com/zhongwencool/observer_cli/issues/78
- Wait/Help with https://github.com/zhongwencool/observer_cli/issues/79
- Create more plugins/panels (I can think of one more for classic queues)
Let's see what @gerhard thinks about this as well.
Oh wow, I can't believe that I haven't thought about this! This would be an amazing addition. Love it! 💙
Relevant: https://github.com/rabbitmq/rabbitmq-server/commit/09b92bacedc85c0878480feb559f2c57bb22d168#diff-18813c86948efc57e661623d7ba48ff94325c9b5421ec9177f724922dd553a35R35
@lhoguin The hard part moving forward is determining what values are the most useful.
This looks like a good starting point to me:
- vhost
- name
- reductions / s
- process memory
- minor GCs
- major GCs
- process mailbox
- gen_server2 buffer
This pull request modifies the erlang.mk build only. Should the makefiles be updated as well @lhoguin?
Following the work on CQv2 and beyond the needs for this type of plugin have changed. I propose the following fields:
- queue pid/vhost/name
- mailbox + GS2 mailbox size
- # messages in memory (q3)
- (v2 only) index buffer size (with/without acks?) (delta, not yet flushed to disk)
- (v2 only) store buffer size (delta, not yet flushed to disk)
- # messages on disk (delta, flushed to disk)
- # messages in transit (pending acks)
- # messages to be confirmed
With that we should have a clear view of where messages are in each CQ.
To test, create some work using classic queues, then connect via rabbitmq-diagnostics observer
and press P
and Enter
to access the plugin.
Hold on before merge there's a small visual bug when there are many queues.
Most recent commit should fix it.
Fantastic addition. Any chance to backport it into earlier versions?
It cannot even be backported to 3.11 as it targets a CQv2 revision scheduled to ship in 3.12.0.
I will soon open a PR for 3.11 and 3.10.