sentry v8.0.0 Sentry.EventFilter behaviour
This module defines a Behaviour for filtering Sentry events.
There is one callback to implement. The first argument will be
the exception reported, and the second is the source. Events
from Sentry.PlugCapture will have :plug as a source and events from
Sentry.LoggerBackend will have :logger as the source. A custom
source can also be specified by passing the event_source option
to Sentry.capture_exception/2.
As an example, if you wanted to exclude any ArithmeticError exceptions:
defmodule MyApp.SentryEventFilter do
@behaviour Sentry.EventFilter
def exclude_exception?(%ArithmeticError{}, _source), do: true
def exclude_exception?(_exception, _source), do: false
endSentry uses Sentry.DefaultEventFilter by default.
Link to this section Summary
Callbacks
Callback that returns whether an exception should be excluded from being reported
Link to this section Callbacks
Link to this callback
exclude_exception?(arg1, atom)
Specs
exclude_exception?(Exception.t(), atom()) :: boolean()
Callback that returns whether an exception should be excluded from being reported