Module otter_span_mpdict_api

This API uses the process dictionary to collect span information and can be used when all span tags and 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 and events happen in the same request handling process. Multiple spans can be stored with different names. After starting the span, subsequent operations (e.g. tag, log, finish) should use the name to refer to the span. The API supports pre filtering with the start_with_tags functions.

Function Index

finish/1Finish collection of span information and invoke the span filter unless the span is marked as inactive (timestamp set to 0).
get_span/1Get the span from the process dictionary.
ids/1Return the trace id and span id of the span in the process dictionary in a tuple.
log/2Add a log to the span in the process dictionary.
log/3Add 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 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 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/3Add a tag to the span in the process dictionary.
tag/4Add a tag with specific service to the span in the process dictionary.

Function Details

finish/1

finish(Name::info()) -> ok

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

get_span/1

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

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

ids/1

ids(Name::info()) -> {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/2

log(Name::info(), 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 timestamp set to 0.

log/3

log(Name::info(), 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 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 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 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/3

tag(Name::info(), 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/4

tag(Name::info(), 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.