Grizzly.Trace.Record (grizzly v9.1.0)

Copy Markdown View Source

Data structure for a single item in the trace log

Summary

Functions

Make a new Grizzly.Record.t() from a binary

Returns the remote node in the trace record, i.e., the node that is not :grizzly.

Turn a record into the string format

Types

opt()

@type opt() ::
  {:src, Grizzly.Trace.src()}
  | {:dest, Grizzly.Trace.dest()}
  | {:timestamp, Time.t()}

t()

@type t() :: %Grizzly.Trace.Record{
  binary: binary(),
  dest: Grizzly.Trace.dest() | nil,
  src: Grizzly.Trace.src() | nil,
  timestamp: Time.t()
}

Functions

new(src, dest, binary, timestamp \\ Time.utc_now())

@spec new(Grizzly.Trace.src(), Grizzly.Trace.dest(), binary(), Time.t()) :: t()

Make a new Grizzly.Record.t() from a binary

remote_node(record)

Returns the remote node in the trace record, i.e., the node that is not :grizzly.

to_string(record, format \\ :text)

@spec to_string(t(), Grizzly.Trace.format()) :: String.t()

Turn a record into the string format