Module otter_span_pdict_api

This API uses the process dictionary to collect span information and can be used when all span tags an events happen in the same request handling process.

Description

This API uses the process dictionary to collect span information and can be used when all span tags an events happen in the same request handling process. There is only 1 span managed with this API. Pre-filtering is supported with the start_with_tags functions.

If you need more spans managed on the process dictionary, then look at the 'otter_span_mpdict_api' API module which can manage multiple spans with different names.

Function Index

finish/0Finish collection of span information and invoke the span filter unless the span is marked as inactive (timestamp set to 0).
get_span/0Get the span from the process dictionary.
ids/0Return the trace id and span id of the span in the process dictionary in a tuple.
log/1Add a log to the span in the process dictionary.
log/2Add a log with specific service to the span in the process dictionary.
put_span/1Put a span to the process dictionary.
start/1start a new span on the process dictionary of the current process.
start/2start a new span on the process dictionary of the current process with an existing trace id or with a parent span.
start/3start a new span on the process dictionary of the current process with an existing trace id and parent id.
start_with_tags/2start a new span with a list of tags on the process dictionary of the current process and invoke the pre filter.
start_with_tags/3start a new span with a list of tags on the process dictionary of the current process with an existing trace id or a parent span.
start_with_tags/4start a new span with a list of tags on the process dictionary of the current process with an existing trace_id and parent_id.
tag/2Add a tag to the span in the process dictionary.
tag/3Add a tag with specific service to the span in the process dictionary.

Function Details

finish/0

finish() -> ok

Finish collection of span information and invoke the span filter unless the span is marked as inactive (timestamp set to 0)

get_span/0

get_span() -> span()

Get the span from the process dictionary. If there is no active span, return an empty one with timestamp set to 0

ids/0

ids() -> {trace_id(), span_id()}

Return the trace id and span id of the span in the process dictionary in a tuple. If there is no active span, return tuple {0, 0}

log/1

log(Text::info()) -> span()

Add a log to the span in the process dictionary. If the span is not active, a "fake" span is returned with the default values and timestamp set to 0.

log/2

log(Text::info(), Service::service()) -> span()

Add a log with specific service to the span in the process dictionary. If the span is not active, a "fake" span is returned with the default values and timestamp set to 0.

put_span/1

put_span(Span::span()) -> term()

Put a span to the process dictionary. This can be used e.g. when taking over a span started with the functional API.

start/1

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

start a new span on the process dictionary of the current process

start/2

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

start a new span on the process dictionary of the current process with an existing trace id or with a parent span

start/3

start(Name::info(), TraceId::trace_id(), ParentId::span_id()) -> span()

start a new span on the process dictionary of the current process with an existing trace id and parent id

start_with_tags/2

start_with_tags(Name::info(), Tags::[tag()]) -> span()

start a new span with a list of tags on the process dictionary of the current process and invoke the pre filter

start_with_tags/3

start_with_tags(Name::info(), Tags::[tag()], TraceId::trace_id()) -> span()

start a new span with a list of tags on the process dictionary of the current process with an existing trace id or a parent span.

start_with_tags/4

start_with_tags(Name::info(), Tags::[tag()], TraceId::trace_id(), ParentId::span_id()) -> span()

start a new span with a list of tags on the process dictionary of the current process with an existing trace_id and parent_id

tag/2

tag(Key::info(), Value::info()) -> span()

Add a tag to the span in the process dictionary. If the span is not active, a fake/empty span is returned with the default values and timestamp set to 0.

tag/3

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

Add a tag with specific service to the span in the process dictionary. If the span is not active, a "fake" span is returned with the default values and timestamp set to 0.


Generated by EDoc, May 26 2017, 15:36:09.