Files
firezone/elixir/apps/api/lib/api/application.ex
2023-09-14 00:24:40 -06:00

24 lines
481 B
Elixir

defmodule API.Application do
use Application
@impl true
def start(_type, _args) do
_ = :opentelemetry_cowboy.setup()
_ = OpentelemetryPhoenix.setup(adapter: :cowboy2)
children = [
API.Telemetry,
API.Endpoint
]
opts = [strategy: :one_for_one, name: API.Supervisor]
Supervisor.start_link(children, opts)
end
@impl true
def config_change(changed, _new, removed) do
API.Endpoint.config_change(changed, removed)
:ok
end
end