Move error tracker notifier files to correct namespace
This commit is contained in:
+1
-1
@@ -15,7 +15,7 @@ config :music_library, monitoring_routes: true
|
||||
|
||||
config :error_tracker, enabled: true
|
||||
|
||||
config :music_library, MusicLibrary.ErrorNotifier,
|
||||
config :music_library, ErrorTracker.ErrorNotifier,
|
||||
from_email: "postmaster@mailgun.fullyforged.com",
|
||||
to_email: "claudio@fullyforged.com",
|
||||
mailer: MusicLibrary.Mailer,
|
||||
|
||||
@@ -27,7 +27,7 @@ Key capabilities:
|
||||
|
||||
```
|
||||
MusicLibrary.Application (one_for_one)
|
||||
├── MusicLibrary.ErrorNotifier # Telemetry-driven error email notifications
|
||||
├── ErrorTracker.ErrorNotifier # Telemetry-driven error email notifications
|
||||
├── MusicLibrary.Vault # Cloak encryption vault
|
||||
├── MusicLibrary.Repo # Main SQLite repo
|
||||
├── MusicLibrary.BackgroundRepo # Oban SQLite repo (separate DB)
|
||||
@@ -123,8 +123,8 @@ Last.fm schemas (separate, not Ecto-persisted to main DB):
|
||||
| `RecordChat` | Chat implementation for records (OpenAI streaming, web search enabled) |
|
||||
| `ArtistChat` | Chat implementation for artists (OpenAI streaming, uses Wikipedia/artist context) |
|
||||
| `Country` | Country code (alpha-2, alpha-3, subdivision, IETF) to flag emoji conversion |
|
||||
| `ErrorNotifier` | GenServer: attaches to ErrorTracker telemetry, throttles repeated errors, dispatches email notifications |
|
||||
| `ErrorNotifier.Email` | Builds and sends Swoosh error notification emails with stack trace formatting |
|
||||
| `ErrorTracker.ErrorNotifier` | GenServer: attaches to ErrorTracker telemetry, throttles repeated errors, dispatches email notifications |
|
||||
| `ErrorTracker.ErrorNotifier.Email` | Builds and sends Swoosh error notification emails with stack trace formatting |
|
||||
| `FormatNumber` | Number formatting utility |
|
||||
|
||||
---
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
defmodule MusicLibrary.ErrorNotifier do
|
||||
defmodule ErrorTracker.ErrorNotifier do
|
||||
@moduledoc false
|
||||
|
||||
use GenServer
|
||||
require Logger
|
||||
|
||||
alias MusicLibrary.ErrorNotifier.Email
|
||||
alias ErrorTracker.ErrorNotifier.Email
|
||||
|
||||
@cleanup_interval :timer.minutes(5)
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
defmodule MusicLibrary.ErrorNotifier.Email do
|
||||
defmodule ErrorTracker.ErrorNotifier.Email do
|
||||
@moduledoc false
|
||||
|
||||
import Swoosh.Email
|
||||
@@ -134,6 +134,6 @@ defmodule MusicLibrary.ErrorNotifier.Email do
|
||||
end
|
||||
|
||||
defp config do
|
||||
Application.get_env(:music_library, MusicLibrary.ErrorNotifier, [])
|
||||
Application.get_env(:music_library, ErrorTracker.ErrorNotifier, [])
|
||||
end
|
||||
end
|
||||
@@ -13,7 +13,7 @@ defmodule MusicLibrary.Application do
|
||||
_ = Req.RateLimiter.new()
|
||||
|
||||
children = [
|
||||
MusicLibrary.ErrorNotifier,
|
||||
ErrorTracker.ErrorNotifier,
|
||||
MusicLibrary.Vault,
|
||||
MusicLibrary.Repo,
|
||||
MusicLibrary.BackgroundRepo,
|
||||
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
defmodule MusicLibrary.ErrorNotifierTest do
|
||||
defmodule ErrorTracker.ErrorNotifierTest do
|
||||
use ExUnit.Case, async: false
|
||||
|
||||
import Swoosh.TestAssertions
|
||||
|
||||
alias MusicLibrary.ErrorNotifier
|
||||
alias ErrorTracker.ErrorNotifier
|
||||
|
||||
@config [
|
||||
from_email: "test@example.com",
|
||||
Reference in New Issue
Block a user