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
Copy file name to clipboardExpand all lines: README.md
+13-5Lines changed: 13 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,13 +47,22 @@ use Sentry.Plug
47
47
48
48
### Capture All Exceptions
49
49
50
-
This library comes with an extension to capture all Error messages that the Plug handler might not. Simply set `use_error_logger` to true.
50
+
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
51
52
-
This is based on the Erlang [error_logger](http://erlang.org/doc/man/error_logger.html).
52
+
To set this up, add `:ok = :error_logger.add_report_handler(Sentry.Logger)` to your application's start function. Example:
|`client`| False |`Sentry.Client`| If you need different functionality for the HTTP client, you can define your own module that implements the `Sentry.HTTPClient` behaviour and set `client` to that module |
Copy file name to clipboardExpand all lines: docs/config.rst
+15-5Lines changed: 15 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,21 @@ If using an environment with Plug or Phoenix add the following to your router:
17
17
use Plug.ErrorHandler
18
18
use Sentry.Plug
19
19
20
+
If you'd like to capture errors from separate processes like `Task` that may crash, add the line ``:ok = :error_logger.add_report_handler(Sentry.Logger)`` to your application's start function:
The name of the server to send with each report. This defaults to nothing.
57
72
58
-
.. describe:: use_error_logger
59
-
60
-
Set this to true if you want to capture all exceptions that occur even outside of a request cycle. This
61
-
defaults to false.
62
-
63
73
.. describe:: client
64
74
65
75
If you need different functionality for the HTTP client, you can define your own module that implements the `Sentry.HTTPClient` behaviour and set `client` to that module.
0 commit comments