檢視原始碼 遙測

LiveView 目前公開下列的 telemetry 事件

  • [:phoenix, :live_view, :mount, :start] - 於執行 mount/3 之前由 Phoenix.LiveView 發送。

    • 測量

      %{system_time: System.monotonic_time}
    • 資料

      %{
        socket: Phoenix.LiveView.Socket.t,
        params: unsigned_params | :not_mounted_at_router,
        session: map,
        uri: String.t() | nil
      }
  • [:phoenix, :live_view, :mount, :stop] - 於 mount/3 回呼執行完成時由 Phoenix.LiveView 發送。

    • 測量

      %{duration: native_time}
    • 資料

      %{
        socket: Phoenix.LiveView.Socket.t,
        params: unsigned_params | :not_mounted_at_router,
        session: map,
        uri: String.t() | nil
      }
  • [:phoenix, :live_view, :mount, :exception] - 於 mount/3 回呼中發生例外時由 Phoenix.LiveView 發送。

    • 測量:%{duration: native_time}

    • 資料

      %{
        socket: Phoenix.LiveView.Socket.t,
        kind: atom,
        reason: term,
        params: unsigned_params | :not_mounted_at_router,
        session: map,
        uri: String.t() | nil
      }
  • [:phoenix, :live_view, :handle_params, :start] - 於執行 handle_params/3 之前由 Phoenix.LiveView 發送。

    • 測量

      %{system_time: System.monotonic_time}
    • 資料

      %{
        socket: Phoenix.LiveView.Socket.t,
        params: unsigned_params,
        uri: String.t()
      }
  • [:phoenix, :live_view, :handle_params, :stop] - 於 handle_params/3 回呼執行完成時由 Phoenix.LiveView 發送。

    • 測量

      %{duration: native_time}
    • 資料

      %{
        socket: Phoenix.LiveView.Socket.t,
        params: unsigned_params,
        uri: String.t()
      }
  • [:phoenix, :live_view, :handle_params, :exception] - 於 handle_params/3 回呼中發生例外時由 Phoenix.LiveView 發送。

    • 測量

      %{duration: native_time}
    • 資料

      %{
        socket: Phoenix.LiveView.Socket.t,
        kind: atom,
        reason: term,
        params: unsigned_params,
        uri: String.t()
      }
  • [:phoenix, :live_view, :handle_event, :start] - 於執行 handle_event/3 之前由 Phoenix.LiveView 發送。

    • 測量

      %{system_time: System.monotonic_time}
    • 資料

      %{
        socket: Phoenix.LiveView.Socket.t,
        event: String.t(),
        params: unsigned_params
      }
  • [:phoenix, :live_view, :handle_event, :stop] - 於 handle_event/3 回呼執行完成時由 Phoenix.LiveView 發送。

    • 測量

      %{duration: native_time}
    • 資料

      %{
        socket: Phoenix.LiveView.Socket.t,
        event: String.t(),
        params: unsigned_params
      }
  • [:phoenix, :live_view, :handle_event, :exception] - 於 handle_event/3 回呼中發生例外時由 Phoenix.LiveView 發送。

    • 測量

      %{duration: native_time}
    • 資料

      %{
        socket: Phoenix.LiveView.Socket.t,
        kind: atom,
        reason: term,
        event: String.t(),
        params: unsigned_params
      }
  • [:phoenix, :live_view, :render, :start] - 於執行 render/1 之前由 Phoenix.LiveView 發送。

    • 測量

      %{system_time: System.monotonic_time}
    • 資料

      %{
        socket: Phoenix.LiveView.Socket.t,
        force?: boolean,
        changed?: boolean
      }
  • [:phoenix, :live_view, :render, :stop] - 由 Phoenix.LiveView 派送,這是在 render/1 回呼函式成功完成時。

    • 測量

      %{duration: native_time}
    • 資料

      %{
        socket: Phoenix.LiveView.Socket.t,
        force?: boolean,
        changed?: boolean
      }
  • [:phoenix, :live_view, :render, :exception] - 由 Phoenix.LiveView 派送,這是在 render/1 回呼函式引發例外時。

    • 測量

      %{duration: native_time}
    • 資料

      %{
        socket: Phoenix.LiveView.Socket.t,
        kind: atom,
        reason: term,
        force?: boolean,
        changed?: boolean
      }
  • [:phoenix, :live_component, :update, :start] - 由 Phoenix.LiveComponent 在呼叫 update/2update_many/1 立即之前派送。

    對於update/2,它可能會針對多個呼叫派送一個事件。

    • 測量

      %{system_time: System.monotonic_time}
    • 資料

      %{
        socket: Phoenix.LiveView.Socket.t,
        component: atom,
        assigns_sockets: [{map(), Phoenix.LiveView.Socket.t}]
      }
  • [:phoenix, :live_component, :update, :stop] - 由 Phoenix.LiveComponent 在呼叫函式 update/2update_many/1 成功完成時派送。

    對於update/2,它可能會針對多個呼叫派送一個事件。sockets 資料中包含更新了的 socket。

    • 測量

      %{duration: native_time}
    • 資料

      %{
        socket: Phoenix.LiveView.Socket.t,
        component: atom,
        assigns_sockets: [{map(), Phoenix.LiveView.Socket.t}],
        sockets: [Phoenix.LiveView.Socket.t]
      }
  • [:phoenix, :live_component, :update, :exception] - 由 Phoenix.LiveComponent 在呼叫函式 update/2update_many/1 引發例外時派送。

    對於update/2,它可能會針對多個呼叫派送一個事件。

    • 測量

      %{duration: native_time}
    • 資料

      %{
        socket: Phoenix.LiveView.Socket.t,
        kind: atom,
        reason: term,
        component: atom,
        assigns_sockets: [{map(), Phoenix.LiveView.Socket.t}]
      }
  • [:phoenix, :live_component, :handle_event, :start] - 由 Phoenix.LiveComponent 在呼叫 handle_event/3 立即之前派送。

    • 測量

      %{system_time: System.monotonic_time}
    • 資料

      %{
        socket: Phoenix.LiveView.Socket.t,
        component: atom,
        event: String.t(),
        params: unsigned_params
      }
  • [:phoenix, :live_component, :handle_event, :stop] - 由 Phoenix.LiveComponent 在呼叫函式 handle_event/3 成功完成時派送。

    • 測量

      %{duration: native_time}
    • 資料

      %{
        socket: Phoenix.LiveView.Socket.t,
        component: atom,
        event: String.t(),
        params: unsigned_params
      }
  • [:phoenix, :live_component, :handle_event, :exception] - 由 Phoenix.LiveComponent 在呼叫函式 handle_event/3 引發例外時派送。

    • 測量

      %{duration: native_time}
    • 資料

      %{
        socket: Phoenix.LiveView.Socket.t,
        kind: atom,
        reason: term,
        component: atom,
        event: String.t(),
        params: unsigned_params
      }