Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose AMQP connection metrics #12638

Merged
merged 1 commit into from
Nov 4, 2024
Merged

Expose AMQP connection metrics #12638

merged 1 commit into from
Nov 4, 2024

Conversation

ansd
Copy link
Member

@ansd ansd commented Nov 2, 2024

Expose the same metrics for AMQP 1.0 connections as for AMQP 0.9.1 connections.

Display the following AMQP 1.0 metrics on the Management UI. The metrics in the red rectangles are new with this PR:

  • Network bytes per second from/to client on connections page
  • Number of sessions/channels on connections page
Screenshot 2024-11-04 at 14 41 29
  • Network bytes per second from/to client graph on connection page
  • Reductions graph on connection page
  • Garbage colletion info on connection page
Screenshot 2024-11-04 at 14 41 55

Expose the following AMQP 1.0 per-object Prometheus metrics:

  • rabbitmq_connection_incoming_bytes_total
  • rabbitmq_connection_outgoing_bytes_total
  • rabbitmq_connection_process_reductions_total
  • rabbitmq_connection_incoming_packets_total
  • rabbitmq_connection_outgoing_packets_total
  • rabbitmq_connection_pending_packets
  • rabbitmq_connection_channels

The rabbit_amqp_writer proc:

  • notifies the rabbit_amqp_reader proc if it sent frames
  • hibernates eventually if it doesn't send any frames

The rabbit_amqp_reader proc:

  • does not emit stats (update ETS tables) if no frames are received or sent to save resources when there are many idle connections.

@ansd ansd added this to the 4.1.0 milestone Nov 2, 2024
@ansd ansd force-pushed the amqp-connection-metrics branch 4 times, most recently from 44b4b3b to 3f9b3b6 Compare November 2, 2024 17:57
Expose the same metrics for AMQP 1.0 connections as for AMQP 0.9.1 connections.

Display the following AMQP 1.0 metrics on the Management UI:
* Network bytes per second from/to client on connections page
* Number of sessions/channels on connections page
* Network bytes per second from/to client graph on connection page
* Reductions graph on connection page
* Garbage colletion info on connection page

Expose the following AMQP 1.0 per-object Prometheus metrics:
* rabbitmq_connection_incoming_bytes_total
* rabbitmq_connection_outgoing_bytes_total
* rabbitmq_connection_process_reductions_total
* rabbitmq_connection_incoming_packets_total
* rabbitmq_connection_outgoing_packets_total
* rabbitmq_connection_pending_packets
* rabbitmq_connection_channels

The rabbit_amqp_writer proc:
* notifies the rabbit_amqp_reader proc if it sent frames
* hibernates eventually if it doesn't send any frames

The rabbit_amqp_reader proc:
* does not emit stats (update ETS tables) if no frames are received
or sent to save resources when there are many idle connections.
@ansd ansd force-pushed the amqp-connection-metrics branch from 3f9b3b6 to 3db4a97 Compare November 2, 2024 18:10
@ansd ansd marked this pull request as ready for review November 2, 2024 18:41
* Reductions
* Garbage collections
* Number of channels/sessions

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • * Pending packets ?
    rabbitmq_connection_pending_packets

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is exposed by the Prometheus endpoint, but not displayed in the Management UI.

@ansd ansd merged commit 6034f3c into main Nov 4, 2024
273 checks passed
@ansd ansd deleted the amqp-connection-metrics branch November 4, 2024 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants