Copyright © 2017 Takeru Ohta <phjgt308@gmail.com>
Behaviours: passage_reporter.
Process Reporter.
This reporter will send the finished spans to a process.
%% Registers `tracer' Context = passage_span_context_null, Sampler = passage_sampler_all:new(), Reporter = passage_reporter_process:new(self(), span), ok = passage_tracer_registry:register(tracer, Context, Sampler, Reporter), %% Starts and finishes a span Span = passage:start_span(example, tracer), passage:finish_span(Span), %% Receives the finish span receive {span, Span} -> example = passage_span:get_operation_name(Span) end.
new/2 | Makes a new reporter. |
new(DestinationPid::pid(), Tag::term()) -> passage_reporter:reporter()
Makes a new reporter.
This reporter will send the finished spans toDestinationPid
by the message {Tag, Span}
.
Generated by EDoc