Copyright © 2017 Takeru Ohta <phjgt308@gmail.com>
Behaviours: gen_server, passage_reporter.
A reporter that sends the spans to an jaeger agent
%% 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_root_span(example, example_tracer). passage:finish_span(Span). % The span will send to the jaeger agent on the localhost
reporter_id() = atom()
Reporter identifier.
start_option() = {thrift_format, thrift_protocol:format()} | {agent_host, inet:hostname()} | {agent_port, inet:port_number()} | {service_name, atom()} | {service_tags, passage:tags()}
compact
."127.0.0.1"
.compact
and binary
are 6831
and 6832
respectively.ReporterId
.#{}
.start_options() = [start_option()]
Options for start/2
.
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. |
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, Oct 24 2017, 03:01:17.