Remove Sentry and Honeybadger
This commit is contained in:
@@ -9,10 +9,6 @@ defmodule MusicLibrary.Application do
|
||||
|
||||
@impl true
|
||||
def start(_type, _args) do
|
||||
:logger.add_handler(:my_sentry_handler, Sentry.LoggerHandler, %{
|
||||
config: %{metadata: [:file, :line]}
|
||||
})
|
||||
|
||||
_ = Assets.Cache.new()
|
||||
|
||||
children = [
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
defmodule MusicLibraryWeb.Endpoint do
|
||||
use Sentry.PlugCapture
|
||||
use Phoenix.Endpoint, otp_app: :music_library
|
||||
|
||||
# The session will be stored in the cookie and signed,
|
||||
@@ -56,8 +55,6 @@ defmodule MusicLibraryWeb.Endpoint do
|
||||
pass: ["*/*"],
|
||||
json_decoder: Phoenix.json_library()
|
||||
|
||||
plug Sentry.PlugContext
|
||||
|
||||
plug Plug.MethodOverride
|
||||
plug Plug.Head
|
||||
plug Plug.Session, @session_options
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
defmodule MusicLibraryWeb.Router do
|
||||
use MusicLibraryWeb, :router
|
||||
use ErrorTracker.Integrations.Plug
|
||||
use Honeybadger.Plug
|
||||
|
||||
import MusicLibraryWeb.Auth, only: [require_logged_in: 2, require_api_token: 2]
|
||||
import Oban.Web.Router
|
||||
|
||||
@@ -107,6 +107,6 @@ defmodule MusicLibraryWeb.Telemetry do
|
||||
end
|
||||
|
||||
defp drop_unwanted_hosts(metadata) do
|
||||
metadata.request.host =~ "archive.org" or metadata.request.host =~ "sentry.io"
|
||||
metadata.request.host =~ "archive.org"
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
defmodule Sentry.FinchClient do
|
||||
@moduledoc """
|
||||
Defines a small shim to use `Finch` as a `Sentry.HTTPClient`.
|
||||
"""
|
||||
|
||||
@behaviour Sentry.HTTPClient
|
||||
|
||||
@impl true
|
||||
def child_spec do
|
||||
Finch.child_spec(name: Sentry.Finch)
|
||||
end
|
||||
|
||||
@impl true
|
||||
def post(url, headers, body) do
|
||||
request = Finch.build(:post, url, headers, body)
|
||||
|
||||
case Finch.request(request, Sentry.Finch) do
|
||||
{:ok, response} ->
|
||||
{:ok, response.status, response.headers, response.body}
|
||||
|
||||
error ->
|
||||
error
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user