Skip to content

Commit e52cf9d

Browse files
committed
more updates
1 parent 9d19647 commit e52cf9d

File tree

3 files changed

+17
-136
lines changed

3 files changed

+17
-136
lines changed

README.md

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,24 @@ The Official Sentry Client for Elixir which provides a simple API to capture exc
77

88
[Documentation](https://hexdocs.pm/sentry/readme.html)
99

10+
## Note on upgrading from Sentry 6.x to 7.x
11+
12+
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+
1018
## Installation
1119

12-
To use Sentry with your projects, edit your mix.exs file to add it as a dependency and 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:
1321

1422
```elixir
15-
defp application do
16-
[applications: [:sentry, :logger]]
17-
end
18-
1923
defp deps do
20-
[{:sentry, "~> 6.4"}]
24+
[
25+
# ...
26+
{:sentry, "~> 7.0"},
27+
]
2128
end
2229
```
2330

@@ -41,9 +48,9 @@ More information on why this may be necessary can be found here: https://github.
4148

4249
### Capture Crashed Process Exceptions
4350

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).
51+
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).
4552

46-
To set this up, add `:ok = :error_logger.add_report_handler(Sentry.Logger)` to your application's start function. Example:
53+
To set this up, add `{:ok, _} = Logger.add_backend(Sentry.LoggerBackend)` to your application's start function. Example:
4754

4855
```elixir
4956
def start(_type, _opts) do
@@ -54,7 +61,7 @@ def start(_type, _opts) do
5461

5562
opts = [strategy: :one_for_one, name: MyApp.Supervisor]
5663

57-
:ok = :error_logger.add_report_handler(Sentry.Logger)
64+
{:ok, _} = Logger.add_backend(Sentry.LoggerBackend)
5865

5966
Supervisor.start_link(children, opts)
6067
end

lib/sentry/logger.ex

Lines changed: 0 additions & 126 deletions
This file was deleted.

mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ defmodule Sentry.Mixfile do
44
def project do
55
[
66
app: :sentry,
7-
version: "6.4.1",
7+
version: "7.0.0",
88
elixir: "~> 1.7",
99
description: "The Official Elixir client for Sentry",
1010
package: package(),

0 commit comments

Comments
 (0)