PhoenixMicro.LiveDashboard.Page (PhoenixMicro v1.0.0)

Copy Markdown View Source

A Phoenix.LiveDashboard page that shows real-time PhoenixMicro metrics.

Requires phoenix_live_dashboard in your application's deps:

{:phoenix_live_dashboard, "~> 0.8"}

Add to your router:

live_dashboard "/dashboard",
  additional_pages: [phoenix_micro: PhoenixMicro.LiveDashboard.Page]

Summary

Functions

collect_data()

@spec collect_data() :: %{
  transport: %{active: String.t(), status: String.t()},
  message_metrics: %{
    received: non_neg_integer(),
    processed: non_neg_integer(),
    failed: non_neg_integer(),
    published: non_neg_integer(),
    avg_duration_ms: number()
  },
  rpc_metrics: %{
    requests: non_neg_integer(),
    timeouts: non_neg_integer(),
    p50_ms: number(),
    p95_ms: number(),
    p99_ms: number()
  },
  circuit_breakers: list(),
  consumers: list(),
  sagas: %{
    started: non_neg_integer(),
    completed: non_neg_integer(),
    compensated: non_neg_integer(),
    fatal: non_neg_integer()
  }
}