Sentry.PlugCapture (sentry v8.0.4) View Source

Provides basic functionality to handle and send errors occurring within Plug applications, including Phoenix. It is intended for usage with Sentry.PlugContext.

Usage

In a Phoenix application, it is important to use this module before the Phoenix endpoint itself. It should be added to your endpoint.ex:

defmodule MyApp.Endpoint
  use Sentry.PlugCapture
  use Phoenix.Endpoint, otp_app: :my_app
  # ...
end

In a Plug application, it can be added below your router:

defmodule MyApp.PlugRouter do
  use Plug.Router
  use Sentry.PlugCapture
  # ...
end