Copyright © 2017 Takeru Ohta <phjgt308@gmail.com>
Behaviours: passage_reporter.
A reporter that sends the spans to an jaeger agent (UDP) or collector (HTTP).
%% Starts `example_reporter'
{ok, Reporter} = jaeger_passage_reporter:start(example_reporter).
[example_reporter] = jaeger_passage_reporter:which_reporters().
%% Registers `example_tracer'
Context = jaeger_passage_span_context.
Sampler = passage_sampler_all:new().
ok = passage_tracer_registry:register(example_tracer, Context, Sampler, Reporter).
%% Starts and finishes a span
Span = passage:start_span(example, [{tracer, example_tracer}]).
passage:finish_span(Span). % The span will send to the jaeger agent on the localhost
reporter_id() = atom()
Reporter identifier.
start_option() = {protocol, udp | http} | jaeger_passage_reporter_udp:start_option() | jaeger_passage_reporter_http:start_option()
udp | http. The default value is udp.start_options() = [start_option()]
Options for start/2.
| get_id/1 | Returns the identifier of Reporter. |
| start/1 | Equivalent to start(ReporterId, []). |
| start/2 | Starts a reporter process. |
| stop/1 | Stops the reporter process. |
| which_reporters/0 | Returns the list of the running reporters. |
get_id(Reporter::passage_reporter:reporter()) -> reporter_id()
Returns the identifier of Reporter.
Reporter is one which has not been created by start/2,
this function will crash.
start(ReporterId::reporter_id()) -> {ok, passage_reporter:reporter()} | {error, Reason}
Equivalent to start(ReporterId, []).
start(ReporterId::reporter_id(), Options::start_options()) -> {ok, Reporter} | {error, Reason}
Starts a reporter process.
stop(ReporterId::reporter_id()) -> ok
Stops the reporter process.
If the reporter which has the identifierReporterId has not been started,
it will be simply ignored.
which_reporters() -> [reporter_id()]
Returns the list of the running reporters.
Generated by EDoc, Jan 23 2020, 22:32:01.