SelectoComponents.Admin.QueryMetricsLive (selecto_components v0.3.21)

Real-time dashboard for query performance monitoring.

Displays:

  • Circuit breaker status
  • Query timeout rates and counts
  • Slow query statistics
  • Connection pool utilization
  • Recent performance trends

usage

Usage

Create a wrapper module in your app:

defmodule MyAppWeb.Admin.QueryMetricsLive do
  use Phoenix.LiveView

  @repo MyApp.Repo
  @monitor MyApp.QueryTimeoutMonitor

  def mount(params, session, socket) do
    SelectoComponents.Admin.QueryMetricsLive.mount(
      params,
      session,
      socket,
      repo: @repo,
      monitor: @monitor
    )
  end

  def handle_info(msg, socket) do
    SelectoComponents.Admin.QueryMetricsLive.handle_info(msg, socket)
  end

  def render(assigns) do
    SelectoComponents.Admin.QueryMetricsLive.render(assigns)
  end
end

Link to this section Summary

Link to this section Functions

Link to this function

handle_info(atom, socket)

Link to this function

mount(params, session, socket, opts)

Link to this function

render(assigns)