@@ -42,6 +42,8 @@ set_tracing_applied(TracingApplied) when is_boolean(TracingApplied) ->
4242is_tracing_applied () ->
4343 (catch ets :lookup_element (rt_trace_tab , apply_traces , 2 )) == true .
4444
45+ % % Apply traces to one or more nodes using redbug tracing and syntax.
46+ % %
4547% % eper documentation for the redbug trace string and options is here:
4648% %
4749% % https://github.com/massemanet/eper/blob/master/doc/redbug.txt
@@ -51,8 +53,15 @@ is_tracing_applied() ->
5153% % http://roberto-aloi.com/erlang/profiling-erlang-applications-using-redbug
5254% %
5355% % Set a trace on a function
54- % % "riak_kv_qry_compiler:compile"
56+ % % rt_redbug:trace(Node, "riak_kv_qry_compiler:compile").
57+ % % rt_redbug:trace(Node, ["riak_kv_qry_compiler:compile", "riak_ql_parser:parse"]).
58+ % %
59+ % % Multiple traces can be set in one call. Calling the `rt_redbug:trace`
60+ % % function a second time stops the traces started by the first call.
5561% %
62+ % % Traces can be stopped by calling `rt_redbug:stop(Nodes)` with the nodes in
63+ % % the test cluster. This is important if there are multiple tests in the same
64+ % % suite, but not if the cluster is torn down at the end of the suite.
5665trace (Nodes , TraceStrings ) ->
5766 trace (Nodes , TraceStrings , []).
5867
@@ -68,7 +77,6 @@ trace(Nodes, TraceStrings, Options1) when (is_atom(Nodes) orelse is_list(Nodes))
6877
6978% %
7079apply_trace (Node , TraceString , Options ) ->
71- lager :info (" APPLY TRACE ~p " , [TraceString ]),
7280 rpc :call (Node , redbug , start , [TraceString , Options ]).
7381
7482% %
0 commit comments