Add observer, prometheus and grafana
This commit is contained in:
@@ -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, []},
|
||||
|
||||
Reference in New Issue
Block a user