ADd tracking for framework event debugging
Summary: ^ Reviewed By: lblasa Differential Revision: D48645332 fbshipit-source-id: faf558c592b00a69586970edea407d8997a54699
This commit is contained in:
committed by
Facebook GitHub Bot
parent
c0347ec830
commit
a275235a7c
@@ -27,6 +27,7 @@ import {eventTypeToName} from './sidebar/inspector/FrameworkEventsInspector';
|
||||
import {startCase} from 'lodash';
|
||||
import {Visualization2D} from './visualizer/Visualization2D';
|
||||
import {getNode} from '../utils/map';
|
||||
import {tracker} from '../utils/tracker';
|
||||
|
||||
export function FrameworkEventsTable({
|
||||
nodeId,
|
||||
@@ -45,6 +46,7 @@ export function FrameworkEventsTable({
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
tracker.track('framework-event-table-opened', {});
|
||||
instance.uiActions.onSelectNode(undefined, 'tree');
|
||||
if (nodeId != null) {
|
||||
managerRef.current?.resetFilters();
|
||||
@@ -77,6 +79,12 @@ export function FrameworkEventsTable({
|
||||
|
||||
const onSelectRow = useCallback(
|
||||
(event: FrameworkEvent | undefined): void => {
|
||||
if (event != null) {
|
||||
tracker.track('framework-event-table-row-selected', {
|
||||
eventType: event.type,
|
||||
});
|
||||
}
|
||||
|
||||
instance.uiActions.onFocusNode(event?.nodeId);
|
||||
},
|
||||
[instance.uiActions],
|
||||
|
||||
@@ -37,6 +37,7 @@ import {FilterOutlined, TableOutlined} from '@ant-design/icons';
|
||||
import {ViewMode} from '../../../DesktopTypes';
|
||||
import {MultiSelectableDropDownItem} from '../../shared/MultiSelectableDropDownItem';
|
||||
import {formatDuration, formatTimestampMillis} from '../../../utils/timeUtils';
|
||||
import {tracker} from '../../../utils/tracker';
|
||||
|
||||
type Props = {
|
||||
node: ClientNode;
|
||||
@@ -97,6 +98,14 @@ export const FrameworkEventsInspector: React.FC<Props> = ({
|
||||
{(showEventTypesSection || showThreadsSection) && (
|
||||
<Dropdown
|
||||
overlayStyle={{minWidth: 200}}
|
||||
onVisibleChange={(visible) => {
|
||||
if (visible) {
|
||||
tracker.track(
|
||||
'framework-event-timeline-filters-adjusted',
|
||||
{},
|
||||
);
|
||||
}
|
||||
}}
|
||||
overlay={
|
||||
<Layout.Container
|
||||
gap="small"
|
||||
@@ -179,6 +188,9 @@ export const FrameworkEventsInspector: React.FC<Props> = ({
|
||||
onClick={(current) => {
|
||||
const idx = parseInt(current, 10);
|
||||
const event = filteredEvents[idx];
|
||||
tracker.track('framework-event-timeline-event-selected', {
|
||||
eventType: event.type,
|
||||
});
|
||||
showExtra?.(
|
||||
'Event details',
|
||||
<EventDetails
|
||||
|
||||
Reference in New Issue
Block a user