You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Elixir 1.7 and Erlang/OTP 21 significantly changed how errors are transmitted (See "Erlang/OTP logger integration" [here](https://elixir-lang.org/blog/2018/07/25/elixir-v1-7-0-released/)). Sentry integrated heavily with Erlang's `:error_logger` module, but it is no longer the suggested path towards handling errors.
13
+
14
+
Sentry 7.x requires Elixir 1.7 and Sentry 6.x will be maintained for applications running prior versions. Documentation for Sentry 6.x can be found [here](https://hexdocs.pm/sentry/6.4.2/readme.html).
15
+
16
+
If you would like to upgrade a project to use Sentry 7.x, see [here](https://gist.github.com/mitchellhenke/4ab6dd8d0ebeaaf9821fb625e0037a4d).
17
+
10
18
## Installation
11
19
12
-
To use Sentry with your projects, edit your mix.exs file to add it as a dependencyand add the `:sentry` package to your applications:
20
+
To use Sentry with your projects, edit your mix.exs file and add it as a dependency. Sentry does not install a JSON library itself, and requires users to have one available. Sentry will default to trying to use Jason for JSON operations, but can be configured to use other ones.
13
21
14
22
```elixir
15
-
defpapplicationdo
16
-
[applications: [:sentry, :logger]]
17
-
end
18
-
19
23
defpdepsdo
20
-
[{:sentry, "~> 6.4"}]
24
+
[
25
+
# ...
26
+
{:sentry, "~> 7.0"},
27
+
{:jason, "~> 1.1"},
28
+
]
21
29
end
22
30
```
23
31
@@ -41,9 +49,9 @@ More information on why this may be necessary can be found here: https://github.
41
49
42
50
### Capture Crashed Process Exceptions
43
51
44
-
This library comes with an extension to capture all error messages that the Plug handler might not. This is based on the Erlang [error_logger](http://erlang.org/doc/man/error_logger.html).
52
+
This library comes with an extension to capture all error messages that the Plug handler might not. This is based on [Logger.Backend](https://hexdocs.pm/logger/Logger.html#module-backends).
45
53
46
-
To set this up, add `:ok = :error_logger.add_report_handler(Sentry.Logger)` to your application's start function. Example:
54
+
To set this up, add `{:ok, _} = Logger.add_backend(Sentry.LoggerBackend)` to your application's start function. Example:
|`filter`| False || Module where the filter rules are defined (see [Filtering Exceptions](https://hexdocs.pm/sentry/Sentry.html#module-filtering-exceptions)) |
120
+
|`json_library`| False |`Jason`||
112
121
113
122
An example production config might look like this:
0 commit comments