Skip to content

Commit abaedd7

Browse files
committed
add plug to sentry docs
1 parent cbb2e1c commit abaedd7

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ Want more? Have a look at the full documentation for more information.
118118

119119
usage
120120
config
121+
plug
121122

122123
Resources:
123124

docs/plug.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Sentry.Plug
2+
=============
3+
4+
Sentry.Plug provides basic funcitonality to handle Plug.ErrorHandler.
5+
6+
To capture errors, simply put the following in your router:
7+
8+
.. code-block:: elixir
9+
10+
use Sentry.Plug
11+
12+
Optional settings
13+
------------------
14+
15+
.. describe:: body_scrubber
16+
17+
The function to call before sending the body of the request to Sentry. It will default to ``Sentry.Plug.default_body_scrubber/1``, which will remove sensitive parameters like "password", "passwd", "secret", or any values resembling a credit card.
18+
19+
.. describe:: header_scrubber
20+
21+
The function to call before sending the headers of the request to Sentry. It will default to ``Sentry.Plug.default_header_scrubber/1``, which will remove "Authorization" and "Authentication" headers.
22+
23+
.. describe:: request_id_header
24+
25+
If you're using Phoenix, Plug.RequestId, or another method to set a request ID response header, and would like to include that information with errors reported by Sentry.Plug, the `:request_id_header` option allows you to set which header key Sentry should check. It will default to "x-request-id", which Plug.RequestId (and therefore Phoenix) also default to.

0 commit comments

Comments
 (0)