diff options
author | href <href@random.sh> | 2021-09-06 15:05:07 +0200 |
---|---|---|
committer | href <href@random.sh> | 2021-09-06 15:05:07 +0200 |
commit | 1c7828f9557eef518030df79254a5df642a406d7 (patch) | |
tree | ee93b99b230af47905992f017014de5d17e9e538 | |
parent | Add sentry (diff) |
Sentry
-rw-r--r-- | lib/lsg/application.ex | 1 | ||||
-rw-r--r-- | lib/lsg_web/endpoint.ex | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/lib/lsg/application.ex b/lib/lsg/application.ex index 5dd9d9c..5b62dcd 100644 --- a/lib/lsg/application.ex +++ b/lib/lsg/application.ex @@ -6,6 +6,7 @@ defmodule LSG.Application do def start(_type, _args) do import Supervisor.Spec + Logger.add_backend(Sentry.LoggerBackend) :ok = LSG.Matrix.setup() :ok = LSG.TelegramRoom.setup() diff --git a/lib/lsg_web/endpoint.ex b/lib/lsg_web/endpoint.ex index 4dd8151..bfd53c8 100644 --- a/lib/lsg_web/endpoint.ex +++ b/lib/lsg_web/endpoint.ex @@ -1,4 +1,5 @@ defmodule LSGWeb.Endpoint do + use Sentry.PlugCapture use Phoenix.Endpoint, otp_app: :lsg # Serve at "/" the static files from "priv/static" directory. @@ -23,8 +24,9 @@ defmodule LSGWeb.Endpoint do plug Plug.Parsers, parsers: [:urlencoded, :multipart, :json], pass: ["*/*"], - json_decoder: Poison + json_decoder: Jason + plug Sentry.PlugContext plug Plug.MethodOverride plug Plug.Head |