1 defmodule Pleroma.Web.AkkomaAPI.MetricsController do
2 use Pleroma.Web, :controller
4 alias Pleroma.Web.Plugs.OAuthScopesPlug
9 %{scopes: ["admin:metrics"]}
15 def show(conn, _params) do
16 if Config.get([:instance, :export_prometheus_metrics], true) do
18 |> text(Pleroma.PrometheusExporter.show())
21 |> send_resp(404, "Not Found")