RabbitMQ Tracing
Erlang Makefile HTML JavaScript
Switch branches/tags
rabbitmq_v3_7_0_milestone17 rabbitmq_v3_7_0_milestone16 rabbitmq_v3_7_0_milestone15 rabbitmq_v3_7_0_milestone14 rabbitmq_v3_7_0_milestone13 rabbitmq_v3_7_0_milestone12 rabbitmq_v3_7_0_milestone11 rabbitmq_v3_7_0_milestone10 rabbitmq_v3_7_0_milestone9 rabbitmq_v3_7_0_milestone8 rabbitmq_v3_7_0_milestone7 rabbitmq_v3_7_0_milestone6 rabbitmq_v3_7_0_milestone5 rabbitmq_v3_7_0_milestone4 rabbitmq_v3_7_0_milestone3 rabbitmq_v3_7_0_milestone2 rabbitmq_v3_7_0_milestone1 rabbitmq_v3_6_11_milestone4 rabbitmq_v3_6_11_milestone3 rabbitmq_v3_6_11_milestone2 rabbitmq_v3_6_11_milestone1 rabbitmq_v3_6_10 rabbitmq_v3_6_10_rc2 rabbitmq_v3_6_10_rc1 rabbitmq_v3_6_10_milestone4 rabbitmq_v3_6_10_milestone3 rabbitmq_v3_6_10_milestone2 rabbitmq_v3_6_10_milestone1 rabbitmq_v3_6_9 rabbitmq_v3_6_8 rabbitmq_v3_6_7 rabbitmq_v3_6_7_rc3 rabbitmq_v3_6_7_rc2 rabbitmq_v3_6_7_rc1 rabbitmq_v3_6_7_milestone6 rabbitmq_v3_6_7_milestone5 rabbitmq_v3_6_7_milestone4 rabbitmq_v3_6_7_milestone3 rabbitmq_v3_6_7_milestone2 rabbitmq_v3_6_7_milestone1 rabbitmq_v3_6_6 rabbitmq_v3_6_6_rc2 rabbitmq_v3_6_6_rc1 rabbitmq_v3_6_6_milestone5 rabbitmq_v3_6_6_milestone4 rabbitmq_v3_6_6_milestone3 rabbitmq_v3_6_6_milestone2 rabbitmq_v3_6_6_milestone1 rabbitmq_v3_6_5 rabbitmq_v3_6_5_milestone2 rabbitmq_v3_6_5_milestone1 rabbitmq_v3_6_4 rabbitmq_v3_6_4_rc1 rabbitmq_v3_6_4_milestone2 rabbitmq_v3_6_4_milestone1 rabbitmq_v3_6_3 rabbitmq_v3_6_3_rc3 rabbitmq_v3_6_3_rc2 rabbitmq_v3_6_3_rc1 rabbitmq_v3_6_3_milestone2 rabbitmq_v3_6_3_milestone1 rabbitmq_v3_6_2 rabbitmq_v3_6_2_rc4 rabbitmq_v3_6_2_rc3 rabbitmq_v3_6_2_rc2 rabbitmq_v3_6_2_rc1 rabbitmq_v3_6_2_milestone5 rabbitmq_v3_6_2_milestone4 rabbitmq_v3_6_2_milestone3 rabbitmq_v3_6_2_milestone2 rabbitmq_v3_6_2_milestone1 rabbitmq_v3_6_1 rabbitmq_v3_6_1_rc2 rabbitmq_v3_6_1_rc1 rabbitmq_v3_6_0 rabbitmq_v3_6_0_rc3 rabbitmq_v3_6_0_rc2 rabbitmq_v3_6_0_rc1 rabbitmq_v3_6_0_milestone3 rabbitmq_v3_6_0_milestone2 rabbitmq_v3_6_0_milestone1 rabbitmq_v3_5_8 rabbitmq_v3_5_7 rabbitmq_v3_5_7_rc2 rabbitmq_v3_5_7_rc1 rabbitmq_v3_5_6 rabbitmq_v3_5_5 rabbitmq_v3_5_4 rabbitmq_v3_5_3 rabbitmq_v3_5_2 rabbitmq_v3_5_1 rabbitmq_v3_5_0 rabbitmq_v3_4_4 rabbitmq_v3_4_3 rabbitmq_v3_4_2 rabbitmq_v3_4_1 rabbitmq_v3_4_0 rabbitmq_v3_3_5 rabbitmq_v3_3_4 rabbitmq_v3_3_3
Nothing to show

README.md

RabbitMQ (Message) Tracing Plugin

This is an opinionated tracing plugin that extends RabbitMQ management UI. It logs messages passing through vhosts with enabled tracing to a log file.

Usage

This plugin ships with RabbitMQ. Enabled it with rabbitmq-plugins enable, then see a "Tracing" tab in the management UI.

Configuration

Configuration options are under the rabbitmq_tracing app (config section, if you will):

  • directory: controls where the log files go. It defaults to "/var/tmp/rabbitmq-tracing".
  • username: username to be used by tracing event consumers (default: <<"guest">>)
  • password: password to be used by tracing event consumers (default: <<"guest">>)

Performance

TL;DR: this plugin is intended to be used in development and QA environments. It will increase RAM consumption and CPU usage of a node.

On a few year old developer-grade machine, rabbitmq-tracing can write about 2000 msg/s to a log file. You should be careful using rabbitmq-tracing if you think you're going to capture more messages than this. Any messages that can't be logged are queued.

The code to serve up the log files over HTTP is not at all sophisticated or efficient, it loads the whole log into memory. If you have large log files you may wish to transfer them off the server in some other way.

HTTP API

GET            /api/traces
GET            /api/traces/<vhost>
GET PUT DELETE /api/traces/<vhost>/<name>
GET            /api/trace-files
GET     DELETE /api/trace-files/<name>    (GET returns the file as text/plain)

Example for how to create a trace using RabbitMQ HTTP API:

curl -i -u guest:guest -H "content-type:application/json" -XPUT \
     http://localhost:55672/api/traces/%2f/my-trace \
     -d'{"format":"text","pattern":"#", "max_payload_bytes":1000}'

max_payload_bytes is optional (omit it to prevent payload truncation), format and pattern are mandatory.