Tapper v0.2.0 Tapper.TraceId

Generate, parse or format a top-level trace id.

The TraceId comprises the 128-bit Zipkin id, with a second component which is generated using a per-VM unique number sequence, to disambiguate parallel requests to the same server, so each request gets it’s own trace server, which prevents lifecycle confusion.

Summary

Functions

format a trace id for logs etc

generate a trace id

parse a trace id from a hex string, for propagation etc

format a trace id to a hex string, for propagation etc

Types

int128()
int128() :: integer
t()
t() :: {int128, integer}

Functions

format(trace_id)
format(trace_id :: t) :: String.t

format a trace id for logs etc.

generate()
generate() :: t

generate a trace id

parse(s)
parse(String.t) :: {:ok, t} | :error

parse a trace id from a hex string, for propagation etc.

to_hex(trace_id)
to_hex(trace_id :: t) :: String.t

format a trace id to a hex string, for propagation etc.