Skip to content

Commit edd78f8

Browse files
committed
use correct behaviour name
1 parent baada7e commit edd78f8

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## master
44

55
* Enhancements
6-
* Allow filtering which exceptions are sent via `Sentry.Filter` behaviour
6+
* Allow filtering which exceptions are sent via `Sentry.EventFilter` behaviour
77

88
* Bug Fixes
99
* Fix usage of deprecated modules

lib/sentry.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ defmodule Sentry do
5454
## Filtering Exceptions
5555
5656
If you would like to prevent certain exceptions, the :filter configuration option
57-
allows you to implement the `Sentry.Filter` behaviour. The first argument is the
57+
allows you to implement the `Sentry.EventFilter` behaviour. The first argument is the
5858
source of the event, and the second is the exception to be sent. `Sentry.Plug`
5959
will have a source of `:plug`, and `Sentry.Logger` will have a source of `:logger`.
6060
If an exception does not come from either of those sources, the source will be nil
@@ -65,7 +65,7 @@ defmodule Sentry do
6565
6666
# sentry_event_filter.exs
6767
defmodule MyApp.SentryEventFilter do
68-
@behaviour Sentry.Filter
68+
@behaviour Sentry.EventFilter
6969
7070
def exclude_exception?(:plug, %Elixir.Phoenix.Router.NoRouteError{}), do: true
7171
def exclude_exception?(_, ), do: false
@@ -84,7 +84,7 @@ defmodule Sentry do
8484
Sentry.capture_exception(other_exception, [source_name: :my_source])
8585
8686
### Options
87-
* `:event_source` - The source passed as the first argument to `Sentry.Filter.exclude_exception?/2`
87+
* `:event_source` - The source passed as the first argument to `Sentry.EventFilter.exclude_exception?/2`
8888
8989
## Configuring The `Logger` Backend
9090

test/support/test_filter.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
defmodule Sentry.TestFilter do
2-
@behaviour Sentry.Filter
2+
@behaviour Sentry.EventFilter
33

44
def exclude_exception?(%ArithmeticError{}, :plug), do: true
55
def exclude_exception?(_, _), do: false

0 commit comments

Comments
 (0)