gen_server
wrapper module for providing tracing facility.
Copyright © 2017 Takeru Ohta <phjgt308@gmail.com>
Behaviours: gen_server.
gen_server
wrapper module for providing tracing facility.
server_name() = {local, atom()} | {global, term()} | {via, module(), term()}
The name of a gen_server
process.
server_ref() = pid() | atom() | {atom(), node()} | {global, term()} | {via, module(), term()}
A reference to a gen_server
process.
start_option() = {span, passage:maybe_span()} | {trace_process_lifecycle, passage:start_span_options()} | {inspect, boolean()} | (GenServerOptions::term())
span
: The parent span that starting this process. The default value is passage_pb:current_span()
.trace_process_lifecycle
: If this option is specified, the started process has a span including from the start of the process to the end of it. The span can be retrieved from the running process by calling process_span/0
.insepct
: If true
, spans for init/1
, handle_call/3
and handle_cast/2
are inserted. The default value is false
.GenServerOptions
are options handled by the gen_server
functions
(e.g., gen_server:start_link/3).
start_options() = [start_option()]
start_result() = {ok, pid()} | ignore | {error, {already_started, pid()} | term()}
The result of a process startup.
See the documentation of gen_server module for more details.call/2 | Equivalent to Call(Name, Request, 5000). |
call/3 | Traceable variant of gen_server:call/3. |
cast/2 | Traceable variant of gen_server:cast/2. |
process_span/0 | Returns the process scope span. |
reply/2 | Equivalent to gen_server:reply / 2. |
start/3 | Traceable variant of gen_server:start/3. |
start/4 | Traceable variant of gen_server:start/4. |
start_link/3 | Traceable variant of gen_server:start_link/3. |
start_link/4 | Traceable variant of gen_server:start_link/4. |
stop/1 | Equivalent to gen_server:stop / 1. |
stop/3 | Equivalent to gen_server:stop / 3. |
with_process_span/1 | Executes Fun within the process scope span. |
call(ServerRef::server_ref(), Request::term()) -> Reply::term()
Equivalent to Call(Name, Request, 5000).
call(ServerRef::server_ref(), Request::term(), Timeout::timeout()) -> Reply::term()
Traceable variant of gen_server:call/3.
This piggybacks the current span which retrieved bypassage_pd:current_span/1
when sending Request
to ServerRef
.
The span will be handled by gen_server_passage:handle_call/3
transparently for the gen_server
implementation module.
cast(ServerRef::server_ref(), Request::term()) -> ok
Traceable variant of gen_server:cast/2.
This piggybacks the current span which retrieved bypassage_pd:current_span/1
when sending Request
to ServerRef
.
The span will be handled by gen_server_passage:handle_cast/2
transparently for the gen_server
implementation module.
process_span() -> passage:maybe_span()
Returns the process scope span.
See also:trace_process_lifecycle
option of start_option()
.
reply(Client::term(), Reply::term()) -> term()
Equivalent to gen_server:reply / 2.
start(Module::module(), Args::term(), Options0::start_options()) -> start_result()
Traceable variant of gen_server:start/3.
start(ServerName::server_name(), Module::module(), Args::term(), Options0::start_options()) -> start_result()
Traceable variant of gen_server:start/4.
start_link(Module::module(), Args::term(), Options0::start_options()) -> start_result()
Traceable variant of gen_server:start_link/3.
start_link(ServerName::server_name(), Module::module(), Args::term(), Options0::start_options()) -> start_result()
Traceable variant of gen_server:start_link/4.
stop(ServerRef::server_ref()) -> ok
Equivalent to gen_server:stop / 1.
stop(ServerRef::server_ref(), Reason::term(), Timeout::timeout()) -> ok
Equivalent to gen_server:stop / 3.
with_process_span(Fun) -> Result
Executes Fun
within the process scope span.
trace_process_lifecycle
option of start_option()
.
Generated by EDoc, Oct 30 2017, 22:50:44.