Set up telemetry and prometheus

This commit is contained in:
href 2019-01-30 16:32:30 +01:00 committed by Mark Felder
commit bc3618a38d
4 changed files with 37 additions and 0 deletions

View file

@ -25,6 +25,7 @@ defmodule Pleroma.Application do
import Cachex.Spec
Pleroma.Config.DeprecationWarnings.warn()
setup_instrumenters()
# Define workers and child supervisors to be supervised
children =
@ -140,6 +141,13 @@ defmodule Pleroma.Application do
end
end
defp setup_instrumenters() do
Pleroma.Web.Endpoint.MetricsExporter.setup()
Pleroma.Web.Endpoint.PipelineInstrumenter.setup()
Pleroma.Web.Endpoint.Instrumenter.setup()
Pleroma.Repo.Instrumenter.setup()
end
if Mix.env() == :test do
defp streamer_child, do: []
defp chat_child, do: []