Module otters

otters API module.

Description

otters API module. Functions have no effect when undefined is passed as a spawn.

This API functions with passing around the Span in the function calls All of them return a Span structure.

Data Types

info()

info() = binary() | iolist() | atom() | integer()

ip4()

ip4() = {0..255, 0..255, 0..255, 0..255}

maybe_span()

maybe_span() = span() | undefined

timestamp in microseconds

service()

service() = binary() | list() | default | {binary() | list(), ip4(), integer()}

span()

span() = #span{}

span_id()

span_id() = integer()

trace_id()

trace_id() = integer()

Function Index

finish/1 Ends a span and prepares queues it to be dispatched to the trace server.
ids/1 Retrives the Trace ID and the Span ID from a span.
log/2 Adds a tag to a span, possibly overwriting the existing value.
log/3 Adds a log to a span with a given service, possibly overwriting the existing value.
start/1 Starts a new span with a given name and a generated trace id.
start/2 Starts a new span with a given Trace ID.
start/3 Starts a new span with a given Trace ID and Parent ID.
start_child/2 Starts a new span as a child of a existing span, using the parents Trace ID and setting the childs parent to the parents Span ID.
tag/3 Adds a tag to a span, possibly overwriting the existing value.
tag/4 Adds a tag to a span with a given service, possibly overwriting the existing value.

Function Details

finish/1

finish(Span::maybe_span()) -> ok

Ends a span and prepares queues it to be dispatched to the trace server.

ids/1

ids(Span::maybe_span()) -> {trace_id(), span_id()} | undefined

Retrives the Trace ID and the Span ID from a span.

log/2

log(Span::maybe_span(), Text::info()) -> maybe_span()

Adds a tag to a span, possibly overwriting the existing value.

log/3

log(Span::maybe_span(), Text::info(), Service::service()) -> maybe_span()

Adds a log to a span with a given service, possibly overwriting the existing value.

start/1

start(Name::info()) -> span()

Starts a new span with a given name and a generated trace id.

start/2

start(Name::info(), TraceId::integer()) -> span()

Starts a new span with a given Trace ID.

start/3

start(Name::info(), TraceId::integer(), ParentId::integer() | undefined) -> span()

Starts a new span with a given Trace ID and Parent ID.

start_child/2

start_child(Name::info(), ParentSpan::maybe_span()) -> maybe_span()

Starts a new span as a child of a existing span, using the parents Trace ID and setting the childs parent to the parents Span ID

tag/3

tag(Span::maybe_span(), Key::info(), Value::info()) -> maybe_span()

Adds a tag to a span, possibly overwriting the existing value.

tag/4

tag(Span::maybe_span(), Key::info(), Value::info(), Service::service()) -> maybe_span()

Adds a tag to a span with a given service, possibly overwriting the existing value.


Generated by EDoc, Apr 9 2017, 12:54:36.