@@ -60,7 +60,9 @@ defmodule ErrorTracker.Integrations.Phoenix do
6060 [ :phoenix , :live_view , :handle_params , :exception ] ,
6161 [ :phoenix , :live_view , :handle_event , :start ] ,
6262 [ :phoenix , :live_view , :handle_event , :exception ] ,
63- [ :phoenix , :live_view , :render , :exception ]
63+ [ :phoenix , :live_view , :render , :exception ] ,
64+ [ :phoenix , :live_component , :update , :exception ] ,
65+ [ :phoenix , :live_component , :handle_event , :exception ]
6466 ]
6567
6668 @ doc false
@@ -111,4 +113,23 @@ defmodule ErrorTracker.Integrations.Phoenix do
111113 def handle_event ( [ :phoenix , :live_view , _action , :exception ] , _ , metadata , :no_config ) do
112114 ErrorTracker . report ( { metadata . kind , metadata . reason } , metadata . stacktrace )
113115 end
116+
117+ def handle_event ( [ :phoenix , :live_component , :update , :exception ] , _ , metadata , :no_config ) do
118+ ErrorTracker . report ( { metadata . kind , metadata . reason } , metadata . stacktrace , % {
119+ "live_view.component" => metadata . component
120+ } )
121+ end
122+
123+ def handle_event (
124+ [ :phoenix , :live_component , :handle_event , :exception ] ,
125+ _ ,
126+ metadata ,
127+ :no_config
128+ ) do
129+ ErrorTracker . report ( { metadata . kind , metadata . reason } , metadata . stacktrace , % {
130+ "live_view.component" => metadata . component ,
131+ "live_view.event" => metadata . event ,
132+ "live_view.event_params" => metadata . params
133+ } )
134+ end
114135end
0 commit comments