LiveDashboard v0.2.2 Phoenix.LiveDashboard.Router View Source
Provides LiveView routing for LiveDashboard.
Link to this section Summary
Functions
Defines a LiveDashboard route.
Link to this section Functions
Defines a LiveDashboard route.
It expects the path
the dashboard will be mounted at
and a set of options.
Options
:metrics
- Configures the module to retrieve metrics from. It can be amodule
or a{module, function}
. If nothing is given, the metrics functionality will be disabled.
Examples
defmodule MyAppWeb.Router do
use Phoenix.Router
import Phoenix.LiveDashboard.Router
scope "/", MyAppWeb do
pipe_through [:browser]
live_dashboard "/dashboard", metrics: {MyAppWeb.Telemetry, :metrics}
end
end