View Source Sentry.Event (sentry v8.1.0)
Provides an Event Struct as well as transformation of Logger entries into Sentry Events.
configuration
Configuration
:in_app_module_allow_list
- Expects a list of modules that is used to distinguish among stacktrace frames that belong to your app and ones that are part of libraries or core Elixir. This is used to better display the significant part of stacktraces. The logic is greedy, so if your app's root module isMyApp
and your setting is[MyApp]
, that module as well as any submodules likeMyApp.Submodule
would be considered part of your app. Defaults to[]
.:report_deps
- Flag for whether to include the loaded dependencies when reporting an error. Defaults to true.
Link to this section Summary
Functions
Builds a map from argument value list. For Sentry, typically the key in the map would be the name of the variable, but we don't have that available.
Creates an Event struct out of context collected and options
Transforms an Exception to a Sentry event.
Link to this section Types
@type t() :: %Sentry.Event{ breadcrumbs: list(), contexts: map(), culprit: String.t() | nil, environment: any(), event_id: String.t() | nil, event_source: any(), exception: [sentry_exception()], extra: map(), fingerprint: list(), level: String.t(), message: String.t() | nil, modules: map(), original_exception: Exception.t() | nil, platform: String.t(), release: any(), request: map(), server_name: any(), stacktrace: %{frames: [map()]}, tags: map(), timestamp: String.t() | nil, user: map() }
Link to this section Functions
@spec args_from_stacktrace(Exception.stacktrace()) :: map()
Builds a map from argument value list. For Sentry, typically the key in the map would be the name of the variable, but we don't have that available.
Creates an Event struct out of context collected and options
options
Options
:exception
- Sentry-structured exception:original_exception
- Original Elixir exception struct:message
- message:stacktrace
- a list of Exception.stacktrace():extra
- map of extra context:user
- map of user context:tags
- map of tags context:request
- map of request context:breadcrumbs
- list of breadcrumbs:event_source
- the source of the event:level
- error level:fingerprint
- list of the fingerprint for grouping this event
@spec culprit_from_stacktrace(Exception.stacktrace()) :: String.t() | nil
@spec stacktrace_to_frames(Exception.stacktrace()) :: [map()]
@spec transform_exception( Exception.t(), keyword() ) :: t()
Transforms an Exception to a Sentry event.
options
Options
:stacktrace
- a list of Exception.stacktrace():extra
- map of extra context:user
- map of user context:tags
- map of tags context:request
- map of request context:breadcrumbs
- list of breadcrumbs:level
- error level:fingerprint
- list of the fingerprint for grouping this event