Hack to disable Prometheus metrics by default

This commit is contained in:
Mark Felder 2020-10-14 16:06:02 -05:00
parent 2013705690
commit 0c7f7bb24d
2 changed files with 19 additions and 15 deletions

View file

@ -636,7 +636,9 @@ config :pleroma, Pleroma.Emails.UserEmail,
config :pleroma, Pleroma.Emails.NewUsersDigestEmail, enabled: false
config :prometheus, Pleroma.Web.Endpoint.MetricsExporter, path: "/api/pleroma/app_metrics"
config :prometheus, Pleroma.Web.Endpoint.MetricsExporter,
enabled: false,
path: "/api/pleroma/app_metrics"
config :pleroma, Pleroma.ScheduledActivity,
daily_user_limit: 25,

View file

@ -135,6 +135,7 @@ defmodule Pleroma.Application do
end
defp setup_instrumenters do
if Application.get_env(:prometheus, Pleroma.Web.Endpoint.MetricsExporter)[:enabled] do
require Prometheus.Registry
if Application.get_env(:prometheus, Pleroma.Repo.Instrumenter) do
@ -153,6 +154,7 @@ defmodule Pleroma.Application do
Pleroma.Web.Endpoint.PipelineInstrumenter.setup()
Pleroma.Web.Endpoint.Instrumenter.setup()
end
end
defp cachex_children do
[