檢視原始碼 遙測
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/2
或update_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/2
或update_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/2
或update_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 }