ScoutApm.Error.ErrorData (scout_apm v2.0.0)
Copy MarkdownInternal representation of an error to be sent to Scout APM.
Summary
Functions
Creates an ErrorData struct from an Elixir exception.
Creates an ErrorData struct from telemetry exception data.
Converts the ErrorData to a map suitable for JSON encoding.
Types
@type t() :: %ScoutApm.Error.ErrorData{ context: map(), environment: map() | nil, exception_class: String.t(), host: String.t() | nil, message: String.t(), request_components: map() | nil, request_id: String.t() | nil, request_params: map() | nil, request_session: map() | nil, request_uri: String.t() | nil, revision_sha: String.t() | nil, trace: [String.t()] }
Functions
@spec from_exception( Exception.t(), keyword() ) :: t()
Creates an ErrorData struct from an Elixir exception.
@spec from_telemetry( :error | :throw | :exit, term(), Exception.stacktrace(), keyword() ) :: t() | nil
Creates an ErrorData struct from telemetry exception data.
Converts the ErrorData to a map suitable for JSON encoding.