Tapper v0.4.1 Tapper.TraceId View Source

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.

Link to this section 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

Link to this section Types

Link to this section Functions

Link to this function

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

format a trace id for logs etc.

Link to this function

generate() View Source
generate() :: t()

generate a trace id

Link to this function

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

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

Link to this function

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

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