View Source Tower.Event (Tower v0.2.0)

Summary

Types

@type error_kind() :: :error | :exit | :throw
@type non_error_kind() :: :message
@type reason() :: Exception.t() | term()
@type t() :: %Tower.Event{
  id: Uniq.UUID.t(),
  kind: error_kind() | non_error_kind(),
  level: :logger.level(),
  log_event: :logger.log_event() | nil,
  metadata: map(),
  reason: reason(),
  stacktrace: Exception.stacktrace() | nil,
  time: :logger.timestamp()
}

Functions

Link to this function

from_caught(kind, reason, stacktrace, options \\ [])

View Source
@spec from_caught(Exception.kind(), reason(), Exception.stacktrace(), Keyword.t()) ::
  t()
Link to this function

from_exception(exception, stacktrace, options \\ [])

View Source
@spec from_exception(Exception.t(), Exception.stacktrace(), Keyword.t()) :: t()
Link to this function

from_exit(reason, stacktrace, options \\ [])

View Source
@spec from_exit(term(), Exception.stacktrace(), Keyword.t()) :: t()
Link to this function

from_message(level, message, options \\ [])

View Source
@spec from_message(:logger.level(), term(), Keyword.t()) :: t()
Link to this function

from_throw(reason, stacktrace, options \\ [])

View Source
@spec from_throw(term(), Exception.stacktrace(), Keyword.t()) :: t()