@@ -139,13 +139,13 @@ defmodule Sentry do
139139 to keep. Defaults to `100`. See `Sentry.Context.add_breadcrumb/1`.
140140
141141 * `:before_send_event` (`t:before_send_event_callback/0`) - allows performing operations
142- on the event *before* it is sent. If the callback returns `nil` or `false`,
143- the event is not reported. If it returns an updated `Sentry.Event`, then
144- the updated event is used instead. See the [*Event Callbacks*
142+ on the event *before* it is sent as well as filtering out the event altogether.
143+ If the callback returns `nil` or `false`, the event is not reported. If it returns an
144+ updated `Sentry.Event`, then the updated event is used instead. See the [*Event Callbacks*
145145 section](#module-event-callbacks) below for more information.
146146
147147 * `:after_send_event` (`t:after_send_event_callback/0`) - callback that is called *after*
148- attempting to send an event. The result of the HTTP call as well as the event will
148+ attempting to send an event. The result of the HTTP call as well as the event will
149149 be passed as arguments. The return value of the callback is not returned. See the
150150 [*Event Callbacks* section](#module-event-callbacks) below for more information.
151151
@@ -231,25 +231,12 @@ defmodule Sentry do
231231 ## Filtering Exceptions
232232
233233 If you would like to prevent Sentry from sending certain exceptions, you can
234- use the `:filter` configuration option. It must be configured to be a module
235- that implements the `Sentry.EventFilter` behaviour.
236-
237- A configuration like the one below prevents sending `Phoenix.Router.NoRouteError`
238- exceptions coming from `Sentry.Plug`, but allows other exceptions to be sent.
239-
240- defmodule MyApp.SentryEventFilter do
241- @behaviour Sentry.EventFilter
242-
243- @impl true
244- def exclude_exception?(%Phoenix.Router.NoRouteError{}, :plug), do: true
245- def exclude_exception?(_exception, _source), do: false
246- end
247-
248- # In config/config.exs
249- config :sentry,
250- filter: MyApp.SentryEventFilter,
251- # other config...
234+ use the `:before_send_event` configuration option. See the [*Event Callbacks*
235+ section](#module-event-callbacks) below.
252236
237+ Before v9.0.0, the recommended way to filter out exceptions was to use a *filter*,
238+ that is, a module implementing the `Sentry.EventFilter` behaviour. This is still supported,
239+ but is not deprecated. See `Sentry.EventFilter` for more information.
253240
254241 ## Event Callbacks
255242
0 commit comments