mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-03-22 03:41:56 +00:00
This adds a feature that will email all admins in a Firezone Account when sync errors occur with their Identity Provider. In order to avoid spamming admins with sync error emails, the error emails are only sent once every 24 hours. One exception to that is when there is a successful sync the `sync_error_emailed_at` field is reset, which means in theory if an identity provider was flip flopping between successful and unsuccessful syncs the admins would be emailed more than once in a 24 hours period. ### Sample Email Message <img width="589" alt="idp-sync-error-message" src="https://github.com/user-attachments/assets/d7128c7c-c10d-4d02-8283-059e2f1f5db5">
24 lines
498 B
Elixir
24 lines
498 B
Elixir
defmodule Web.Application do
|
|
use Application
|
|
|
|
@impl true
|
|
def start(_type, _args) do
|
|
_ = OpentelemetryLiveView.setup()
|
|
_ = :opentelemetry_cowboy.setup()
|
|
_ = OpentelemetryPhoenix.setup(adapter: :cowboy2)
|
|
|
|
children = [
|
|
Web.Endpoint
|
|
]
|
|
|
|
opts = [strategy: :one_for_one, name: Web.Supervisor]
|
|
Supervisor.start_link(children, opts)
|
|
end
|
|
|
|
@impl true
|
|
def config_change(changed, _new, removed) do
|
|
Web.Endpoint.config_change(changed, removed)
|
|
:ok
|
|
end
|
|
end
|