Module passage_reporter

Span Reporter.

Copyright © 2017 Takeru Ohta <phjgt308@gmail.com>

This module defines the passage_reporter behaviour.
Required callback functions: report/2.

Description

Span Reporter.

Note that this component has not been described in the OpenTracing Specification.

Callbacks

This module requires following callback:

  %% @doc Reports the finished span to an external observer (e.g., Jaeger agent).
  -callback report(state(), FinishedSpan :: passage_span:span()) -> Ignored :: term().

Data Types

reporter()

abstract datatype: reporter()

Reporter.

state()

state() = term()

Implementation-dependent state.

Function Index

get_module/1Returns the module of Reporter.
get_state/1Returns the state of Reporter.
is_reporter/1Returns true if X is a reporter, otherwise false.
new/2Makes a new reporter.
report/2Reports the given finished span.

Function Details

get_module/1

get_module(Reporter::reporter()) -> module()

Returns the module of Reporter.

get_state/1

get_state(Reporter::reporter()) -> state()

Returns the state of Reporter.

is_reporter/1

is_reporter(X::reporter() | term()) -> boolean()

Returns true if X is a reporter, otherwise false.

new/2

new(Module::module(), State::state()) -> passage_reporter:reporter()

Makes a new reporter.

report/2

report(Passage_reporter::reporter(), Span::passage_span:span()) -> ok

Reports the given finished span.


Generated by EDoc