kill prometheus errors at startup when prometheus is not configured

This commit is contained in:
William Pitcock 2019-05-19 05:24:23 +00:00
parent 8e9a764dfc
commit a381b0a7ec
3 changed files with 7 additions and 2 deletions

View File

@ -239,7 +239,8 @@ config :pleroma, :instance,
welcome_message: nil,
max_report_comment_size: 1000,
safe_dm_mentions: false,
healthcheck: false
healthcheck: false,
instrumentation: false
config :pleroma, :app_account_creation, enabled: true, max_requests: 25, interval: 1800

View File

@ -104,6 +104,7 @@ config :pleroma, Pleroma.Emails.Mailer,
* `max_report_comment_size`: The maximum size of the report comment (Default: `1000`)
* `safe_dm_mentions`: If set to true, only mentions at the beginning of a post will be used to address people in direct messages. This is to prevent accidental mentioning of people when talking about them (e.g. "@friend hey i really don't like @enemy"). (Default: `false`)
* `healthcheck`: if set to true, system data will be shown on ``/api/pleroma/healthcheck``.
* `instrumentation`: enable instrumenters for Prometheus metrics
## :app_account_creation
REST API for creating an account settings

View File

@ -25,7 +25,10 @@ defmodule Pleroma.Application do
import Cachex.Spec
Pleroma.Config.DeprecationWarnings.warn()
setup_instrumenters()
if Pleroma.Config.get([:instance, :instrumentation]) do
setup_instrumenters()
end
# Define workers and child supervisors to be supervised
children =