Add observer, prometheus and grafana

This commit is contained in:
2026-04-24 18:20:48 +03:00
parent dad178bd0d
commit e57a2b9768
13 changed files with 1793 additions and 25 deletions

View File

@@ -14,6 +14,9 @@ start(_StartType, _StartArgs) ->
ok = infra_mnesia:wait_for_tables(),
start_http(),
start_admin_http(),
% Запускаем сборщик метрик Prometheus
application:ensure_all_started(prometheus),
application:ensure_all_started(prometheus_cowboy),
{ok, Pid};
Error ->
Error
@@ -27,6 +30,7 @@ start_http() ->
Dispatch = cowboy_router:compile([
{'_', [
{"/metrics/[:registry]", prometheus_cowboy2_handler, []},
{"/health", handler_health, []},
{"/v1/register", handler_register, []},
{"/v1/login", handler_login, []},