otter API module. Use the API in this module to interact with
the otter
application. If you want to specifically use the
process dictionary API, use the otter_pdict_api
module instead.
The API is broken down into 3 sections. The Span API
,
Snapshot/Count API
and Config API
.
These API calls allow you to create and manage spans. These are:
start/1, start/2, start/3
finish/1
ids/1
log/2, log/3
tag/3, tag/4
When finish/1
is called then the completed span is
passed to a configurable filter. The filter can check the Span tags
as well as the name and duration of the span and use the information
to decide to send the Span to the trace collector (Zipkin supported)
and/or increase counters based on values of the tags and store the
last Span for the counters. This latter is particularly useful for
troubleshooting e.g. error events when increase of the corresponding
counter is noticed. These snapshots (referred as Snap) and counters
can be retrieved, managed with this API. These are:
counter_list/0
counter_snapshot/1
counter_delete/1
counter_delete_all/0
otter.app
file as a reference. These are:config_list/0
config_read/1
config_read/2
config_write/2
config_list/0 | |
config_read/1 | |
config_read/2 | |
config_write/2 | |
counter_delete/1 | |
counter_delete_all/0 | |
counter_list/0 | |
counter_snapshot/1 | |
finish/1 | Ends a span and prepares it for potential delivery to the backend based on filtering rules. |
ids/1 | Returns the TraceId and SpanId for a given span. |
log/2 | Adds a log message to a span. |
log/3 | |
start/1 | Starts a span with the specified name. |
start/2 | Starts a span with the specified name and TraceId. |
start/3 | Starts a child span with the specified name, TraceId and ParentId. |
tag/3 | Adds a tag to a span. |
tag/4 | Adds a tag to a span with a given service. |
config_list() -> term()
config_read(Key::atom()) -> term()
config_read(Key::atom(), Default::term()) -> term()
config_write(Key::atom(), Value::term()) -> ok
counter_delete(Key::list()) -> ok
counter_delete_all() -> ok
counter_list() -> [{list(), integer()}]
counter_snapshot(Key::list()) -> term()
finish(Span::span()) -> ok
Ends a span and prepares it for potential delivery to the backend based on filtering rules
ids(Span::span()) -> {trace_id(), span_id()}
Returns the TraceId and SpanId for a given span.
Adds a log message to a span
Starts a span with the specified name. Automatically generates a TraceId.
Starts a span with the specified name and TraceId
Starts a child span with the specified name, TraceId and ParentId
Adds a tag to a span. If the tag already exists, its value will be overwritten
Adds a tag to a span with a given service. If the tag already exists, its value will be overwritten
Generated by EDoc, Apr 14 2017, 04:39:45.