Skip to content

Commit 7a6f5f6

Browse files
author
andytill
committed
Added a section on tracing with riak_test.
1 parent d337dfc commit 7a6f5f6

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,30 @@ you add them via one of the methods listed previously.
356356

357357
{load_intercepts, false}
358358

359+
### Adding Tracing to Nodes Under Test
360+
361+
Erlang Tracing can be added to test suites to trace function calls on
362+
nodes under test. By default, trace calls will not execute without the
363+
`riak_test` tracing command line argument
364+
365+
```shell
366+
--trace
367+
```
368+
369+
To add tracing to target nodes, make a call to the `rt_redbug:trace/2`
370+
function. `Nodes` is a single node name or a list of node names that the
371+
trace should be applied to. The second argument is a string or list of
372+
string traces using the redbug syntax. An arity three function is also
373+
exported that takes options as defined in the redbug docs.
374+
375+
```erlang
376+
rt_redbug:trace(Nodes, ["module:function"])
377+
```
378+
379+
Tracing is output to the terminal and `test.log` file. More documentation on
380+
redbug can be found
381+
[here](https://github.com/massemanet/eper/blob/master/doc/redbug.txt).
382+
359383
#### Config
360384

361385
Here is how you would add the `dropped_put` intercept via the config.

0 commit comments

Comments
 (0)