File: README.md

package info (click to toggle)
rabbitmq-server 3.6.6-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 19,056 kB
  • ctags: 108,819
  • sloc: erlang: 84,854; xml: 3,238; sh: 3,141; python: 1,685; makefile: 1,092; perl: 64; ruby: 63; java: 38
file content (56 lines) | stat: -rw-r--r-- 2,010 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# RabbitMQ (Message) Tracing Plugin

This is an opinionated tracing plugin that extends RabbitMQ management UI.
It logs messages passing through vhosts [with enabled tracing](http://www.rabbitmq.com/firehose.html) 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](http://www.rabbitmq.com/management.html):

```
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.