diff --git a/lib/nerves_hub/prom_ex.ex b/lib/nerves_hub/prom_ex.ex index 8f79ea47a..d34a5ba9a 100644 --- a/lib/nerves_hub/prom_ex.ex +++ b/lib/nerves_hub/prom_ex.ex @@ -9,7 +9,14 @@ defmodule NervesHub.PromEx do # PromEx built in plugins Plugins.Application, Plugins.Beam, - {Plugins.Phoenix, endpoint: NervesHubWeb.Endpoint, router: NervesHubWeb.Router}, + { + PromEx.Plugins.Phoenix, + endpoints: [ + {NervesHubWeb.Endpoint, routers: [NervesHubWeb.Router]}, + # DeviceEndpoint doesn't use a Router, but we need to pass to PromEx + {NervesHubWeb.DeviceEndpoint, routers: [NervesHubWeb.Router]} + ] + }, Plugins.PhoenixLiveView, Plugins.Ecto, Plugins.Oban @@ -27,7 +34,6 @@ defmodule NervesHub.PromEx do def dashboards do [ # PromEx built in Grafana dashboards - {:prom_ex, "application.json"}, {:prom_ex, "beam.json"}, {:nerves_hub, "grafana/phoenix.json"}, {:nerves_hub, "grafana/phoenix_live_view.json"}, diff --git a/mix.exs b/mix.exs index 220c4bab2..601cb21f1 100644 --- a/mix.exs +++ b/mix.exs @@ -99,7 +99,7 @@ defmodule NervesHub.MixProject do {:plug, "~> 1.7"}, {:postgrex, "~> 0.14"}, {:prom_ex, "~> 1.10", - git: "https://github.com/joshk/prom_ex", ref: "plug_cowboy-should-be-optional"}, + git: "https://github.com/joshk/prom_ex", ref: "updated-with-prs"}, {:scrivener_ecto, "~> 2.7"}, {:scrivener_html, git: "https://github.com/nerves-hub/scrivener_html", branch: "phx-1.5"}, {:sentry, "~> 10.0"}, diff --git a/mix.lock b/mix.lock index 75b2025fd..4d56747b6 100644 --- a/mix.lock +++ b/mix.lock @@ -69,7 +69,7 @@ "plug": {:hex, :plug, "1.16.1", "40c74619c12f82736d2214557dedec2e9762029b2438d6d175c5074c933edc9d", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "a13ff6b9006b03d7e33874945b2755253841b238c34071ed85b0e86057f8cddc"}, "plug_crypto": {:hex, :plug_crypto, "2.1.0", "f44309c2b06d249c27c8d3f65cfe08158ade08418cf540fd4f72d4d6863abb7b", [:mix], [], "hexpm", "131216a4b030b8f8ce0f26038bc4421ae60e4bb95c5cf5395e1421437824c4fa"}, "postgrex": {:hex, :postgrex, "0.19.1", "73b498508b69aded53907fe48a1fee811be34cc720e69ef4ccd568c8715495ea", [:mix], [{:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:table, "~> 0.1.0", [hex: :table, repo: "hexpm", optional: true]}], "hexpm", "8bac7885a18f381e091ec6caf41bda7bb8c77912bb0e9285212829afe5d8a8f8"}, - "prom_ex": {:git, "https://github.com/joshk/prom_ex", "e53b32d136568d3a34f5b2cc4370072b2d96da49", [ref: "plug_cowboy-should-be-optional"]}, + "prom_ex": {:git, "https://github.com/joshk/prom_ex", "6d11c1e8ad66d5851197e97e2b36287fabaa50e4", [ref: "updated-with-prs"]}, "ranch": {:hex, :ranch, "2.1.0", "2261f9ed9574dcfcc444106b9f6da155e6e540b2f82ba3d42b339b93673b72a3", [:make, :rebar3], [], "hexpm", "244ee3fa2a6175270d8e1fc59024fd9dbc76294a321057de8f803b1479e76916"}, "recon": {:hex, :recon, "2.5.6", "9052588e83bfedfd9b72e1034532aee2a5369d9d9343b61aeb7fbce761010741", [:mix, :rebar3], [], "hexpm", "96c6799792d735cc0f0fd0f86267e9d351e63339cbe03df9d162010cefc26bb0"}, "scrivener": {:hex, :scrivener, "2.7.2", "1d913c965ec352650a7f864ad7fd8d80462f76a32f33d57d1e48bc5e9d40aba2", [:mix], [], "hexpm", "7866a0ec4d40274efbee1db8bead13a995ea4926ecd8203345af8f90d2b620d9"},