Module otter_span_id_api

This API uses a separate process to collect information of a span.

Description

This API uses a separate process to collect information of a span. The idea behind this is to provide a static ID which can be used to refer to the span. This is more convenient to integrate than the basic functional API is not limited by process boundaries as with the process dictionary APIs. The API also supports pre filtering with the start_with_tags functions.

Function Index

finish/1Finish the span and pass it to filtering if it is active.
ids/1Get the trace id and span id from a span.
log/2Add a log to the span.
log/3Add a log to the span with specific service information.
start/1Start a new span collection process.
start/2Start a new span collection process with an existing trace id or parent span.
start/3Start a new span collection process with an existing trace id and parent span id.
start_with_tags/2Start a new span with a list of tags and pass it to pre filtering.
start_with_tags/3Start a new span with a list of tags and a trace id or parent span and pass it to pre filtering.
start_with_tags/4Start a new span with a list of tags, a trace id and parent span id then pass it to pre filtering.
tag/3Add a tag to the span.
tag/4Add a tag to the span with specific service information.

Function Details

finish/1

finish(Pid::pid() | undefined) -> ok

Finish the span and pass it to filtering if it is active

ids/1

ids(Pid::pid() | undefined) -> {trace_id(), span_id()}

Get the trace id and span id from a span. If the span is inactive it returns the tuple {0,0}

log/2

log(Pid::pid() | undefined, Text::info()) -> ok

Add a log to the span

log/3

log(Pid::pid() | undefined, Text::info(), Service::service()) -> ok

Add a log to the span with specific service information

start/1

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

Start a new span collection process

start/2

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

Start a new span collection process with an existing trace id or parent span

start/3

start(Name::info(), TraceId::trace_id(), ParentId::integer()) -> pid()

Start a new span collection process with an existing trace id and parent span id

start_with_tags/2

start_with_tags(Name::info(), Tags::[tag()]) -> pid() | undefined

Start a new span with a list of tags and pass it to pre filtering. If the span is active then start a span collection process. For inactive span the atom undefined is returned instead of the PID.

start_with_tags/3

start_with_tags(Name::info(), Tags::[tag()], TraceId::trace_id()) -> pid() | undefined

Start a new span with a list of tags and a trace id or parent span and pass it to pre filtering. If the span is active then start a span collection process. For inactive span the atom undefined is returned instead of the PID.

start_with_tags/4

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

Start a new span with a list of tags, a trace id and parent span id then pass it to pre filtering. If the span is active then start a span collection process. For inactive span the atom undefined is returned instead of the PID.

tag/3

tag(Pid::pid() | undefined, Key::info(), Value::info()) -> ok

Add a tag to the span

tag/4

tag(Pid::pid() | undefined, Key::info(), Value::info(), Service::service()) -> ok

Add a tag to the span with specific service information


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