Setup Sentry
This commit is contained in:
@@ -7,6 +7,10 @@ defmodule MusicLibrary.Application do
|
||||
|
||||
@impl true
|
||||
def start(_type, _args) do
|
||||
:logger.add_handler(:my_sentry_handler, Sentry.LoggerHandler, %{
|
||||
config: %{metadata: [:file, :line]}
|
||||
})
|
||||
|
||||
children = [
|
||||
MusicLibraryWeb.Telemetry,
|
||||
MusicLibrary.Repo,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
defmodule MusicLibraryWeb.Endpoint do
|
||||
use Sentry.PlugCapture
|
||||
use Phoenix.Endpoint, otp_app: :music_library
|
||||
|
||||
# The session will be stored in the cookie and signed,
|
||||
@@ -46,6 +47,8 @@ defmodule MusicLibraryWeb.Endpoint do
|
||||
pass: ["*/*"],
|
||||
json_decoder: Phoenix.json_library()
|
||||
|
||||
plug Sentry.PlugContext
|
||||
|
||||
plug Plug.MethodOverride
|
||||
plug Plug.Head
|
||||
plug Plug.Session, @session_options
|
||||
|
||||
Reference in New Issue
Block a user