Tapper v0.6.2 Tapper.Tracer.Api behaviour View Source

The (minimal) low-level API for the Tapper.Tracer; clients will normally use the Tapper module.

Link to this section Summary

Types

Delta for simple annotations

Delta for async span

Delta for binary annotations

Delta for span name

Denote a client span or a server span; used to automatically add :sr or :cs annotation.

Link to this section Types

Specs

annotation_delta() ::
  {:annotate, {value :: annotation_value(), endpoint :: maybe_endpoint()}}
  | annotation_value()

Delta for simple annotations

Specs

annotation_value() :: String.t() | atom()

Specs

async_delta() :: {:async, boolean()}

Delta for async span

Link to this type

binary_annotation_delta()

View Source

Specs

binary_annotation_delta() ::
  {:binary_annotate,
   {type :: binary_annotation_type(), key :: binary_annotation_key(),
    value :: binary_annotation_value(), endpoint :: maybe_endpoint()}}

Delta for binary annotations

Link to this type

binary_annotation_key()

View Source

Specs

binary_annotation_key() :: String.t() | atom()
Link to this type

binary_annotation_type()

View Source

Specs

binary_annotation_type() ::
  :string | :bool | :i16 | :i32 | :i64 | :double | :bytes
Link to this type

binary_annotation_value()

View Source

Specs

binary_annotation_value() ::
  String.t() | atom() | boolean() | integer() | float() | binary()

Specs

Specs

maybe_endpoint() :: Tapper.Endpoint.t() | nil

Specs

name_delta() :: {:name, name :: String.t() | atom()}

Delta for span name

Specs

span_type() :: :client | :server

Denote a client span or a server span; used to automatically add :sr or :cs annotation.

Link to this section Callbacks

Specs

finish(tapper_id :: Tapper.Id.t(), opts :: Keyword.t()) :: :ok
Link to this callback

finish_span(tapper_id, opts)

View Source

Specs

finish_span(tapper_id :: Tapper.Id.t(), opts :: Keyword.t()) :: Tapper.Id.t()
Link to this callback

join(trace_id, span_id, parent_id, sample, debug, opts)

View Source

Specs

join(
  trace_id :: Tapper.TraceId.t(),
  span_id :: Tapper.SpanId.t(),
  parent_id :: Tapper.SpanId.t() | :root,
  sample :: boolean(),
  debug :: boolean(),
  opts :: Keyword.t()
) :: Tapper.Id.t()

Specs

start(opts :: Keyword.t()) :: Tapper.Id.t()
Link to this callback

start_span(tapper_id, opts)

View Source

Specs

start_span(tapper_id :: Tapper.Id.t(), opts :: Keyword.t()) :: Tapper.Id.t()
Link to this callback

update_span(tapper_id, deltas, opts)

View Source

Specs

update_span(
  tapper_id :: Tapper.Id.t(),
  deltas :: delta() | [delta()],
  opts :: Keyword.t()
) :: Tapper.Id.t()