Raygun.Format

This module builds payloads of error messages that Raygun will understand. These functions return maps of data which will be encoding as JSON prior to submission to Raygun.

Summary

Functions

Builds an error payload that Raygun will understand for an exception that was caught in our Plug

Return custom information. Tags are configured per application via config and user custom data can be provided per error

Returns deatils about the client and server machine

Return a map of information about the environment in which the bug was encountered

Given a stacktrace and an exception, return a map with the error data

Builds an error payload that Raygun will understand for a string

Get the current time in ISO 8601 format

Given a Plug Conn return a map containing information about the request

Given a Plug Conn return a map containing information about the response

Given a stacktrace return a list of maps for the frames

Given a stacktrace frame, return a map with the information in a structure that Raygun will understand

Builds an error payload that Raygun will understand for an exception and its corresponding stacktrace

Get the logged in user from the opts if one is provided. If not, it gets the system user if one is specified

Functions

conn_payload(conn, stacktrace, exception, opts)

Builds an error payload that Raygun will understand for an exception that was caught in our Plug.

custom(opts)

Return custom information. Tags are configured per application via config and user custom data can be provided per error.

details(opts \\ [])

Returns deatils about the client and server machine.

environment()

Return a map of information about the environment in which the bug was encountered.

err(stacktrace, error)

Given a stacktrace and an exception, return a map with the error data.

message_payload(msg, opts)

Builds an error payload that Raygun will understand for a string.

now()

Get the current time in ISO 8601 format.

If you see an error sending messages to Raygun that looks like:

:ets.lookup(:tzdata_current_release, :release_version)

then you need to add :tzdata to your list of applications in your mix.exs file.

request(conn)

Given a Plug Conn return a map containing information about the request.

response(conn)

Given a Plug Conn return a map containing information about the response.

stacktrace(s)

Given a stacktrace return a list of maps for the frames.

stacktrace_entry(arg)

Given a stacktrace frame, return a map with the information in a structure that Raygun will understand.

stacktrace_payload(stacktrace, exception, opts)

Builds an error payload that Raygun will understand for an exception and its corresponding stacktrace.

user(opts)

Get the logged in user from the opts if one is provided. If not, it gets the system user if one is specified.