I’m setting up Prometheus with Phoenix. I’m having trouble
When I call http://localhost:4000/metrics - no route found for GET / metrics
Here are the settings I’m following:
config.ex
…
instrumenters: [EudorosProducerWeb.PhoenixInstrumenter]
…
config: prometheus, ProducerWeb.Endpoint.Instrumenter,
controller_call_labels: [: controller,: action],
channel_join_labels: [: channel,: topic,: transport],
duration_unit:: microseconds,
registry:: default
phoenix_instrumenter.ex
defmodule ProducerWeb.PhoenixInstrumenter
@moduledoc "" "
Provides instrumentation for Phoenix specific metrics.
"" "
use Prometheus.PhoenixInstrumenter
end
mix.ex
def application do
[
...
extra_applications: [:logger, :runtime_tools, :prometheus_phoenix]
]
end
defp deps do
[
....
{:prometheus, "~> 4.0", override: true},
{:prometheus_ex, "~> 3.0"},
{:prometheus_ecto, "~> 1.0"},
{:prometheus_phoenix, "~> 1.2"},
{:prometheus_plugs, "~> 1.0"},
{:prometheus_process_collector, "~> 1.3"}
...]
Where could I be wrong?
Thank you.