forked from AkkomaGang/akkoma
Fix prometheus-ecto error when not configured
This commit is contained in:
parent
943d1b2f26
commit
f96e9b28bb
1 changed files with 11 additions and 8 deletions
|
@ -131,6 +131,7 @@ defmodule Pleroma.Application do
|
||||||
defp setup_instrumenters do
|
defp setup_instrumenters do
|
||||||
require Prometheus.Registry
|
require Prometheus.Registry
|
||||||
|
|
||||||
|
if Application.get_env(:prometheus, Pleroma.Repo.Instrumenter) do
|
||||||
:ok =
|
:ok =
|
||||||
:telemetry.attach(
|
:telemetry.attach(
|
||||||
"prometheus-ecto",
|
"prometheus-ecto",
|
||||||
|
@ -139,11 +140,13 @@ defmodule Pleroma.Application do
|
||||||
%{}
|
%{}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Pleroma.Repo.Instrumenter.setup()
|
||||||
|
end
|
||||||
|
|
||||||
Prometheus.Registry.register_collector(:prometheus_process_collector)
|
Prometheus.Registry.register_collector(:prometheus_process_collector)
|
||||||
Pleroma.Web.Endpoint.MetricsExporter.setup()
|
Pleroma.Web.Endpoint.MetricsExporter.setup()
|
||||||
Pleroma.Web.Endpoint.PipelineInstrumenter.setup()
|
Pleroma.Web.Endpoint.PipelineInstrumenter.setup()
|
||||||
Pleroma.Web.Endpoint.Instrumenter.setup()
|
Pleroma.Web.Endpoint.Instrumenter.setup()
|
||||||
Pleroma.Repo.Instrumenter.setup()
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def enabled_hackney_pools do
|
def enabled_hackney_pools do
|
||||||
|
|
Loading…
Reference in a new issue