Copyright © 2017 Takeru Ohta <phjgt308@gmail.com>
This module defines the passage_sampler behaviour.
Required callback functions: is_sampled/3.
Span Sampler.
Note that this component has not been described in the OpenTracing Specification.
This module requires following callback:
%% @doc Determines to sample the next span which has the given name and tags. -callback is_sampled(state(), passage:operation_name(), passage:tags()) -> boolean().
abstract datatype: sampler()
Sampler.
state() = term()
Implementation-dependent state.
get_module/1 | Returns the module of Sampler . |
get_state/1 | Returns the state of Sampler . |
is_sampled/3 | Determines to sample the next span which has the given name and tags. |
is_sampler/1 | Returns true if X is a sampler, otherwise false . |
new/2 | Makes a new sampler. |
get_module(Sampler::sampler()) -> module()
Returns the module of Sampler
.
Returns the state of Sampler
.
is_sampled(Passage_sampler::sampler(), Name::passage:operation_name(), Tags::passage:tags()) -> boolean()
Determines to sample the next span which has the given name and tags.
is_sampler(X::sampler() | term()) -> boolean()
Returns true
if X
is a sampler, otherwise false
.
Makes a new sampler.
Note thatModule
must be a implementation module of passage_sampler
behaviour.
Generated by EDoc