telemetry: Add panel button clicked event (#36735)

The event has two fields

1. name: The name of the panel being clicked
2. toggle_state: true if clicking to open, otherwise false

cc @katie-z-geer 

Release Notes:

- N/A
This commit is contained in:
Anthony Eid 2025-08-22 01:54:25 -04:00 committed by GitHub
parent b349a8f34c
commit e360691106
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -915,6 +915,11 @@ impl Render for PanelButtons {
.on_click({
let action = action.boxed_clone();
move |_, window, cx| {
telemetry::event!(
"Panel Button Clicked",
name = name,
toggle_state = !is_open
);
window.focus(&focus_handle);
window.dispatch_action(action.boxed_clone(), cx)
}