BrowseDashboards: Add tracking for renaming folders (#75160)
* feat: add tracking events * feat: add error code to tracking data
This commit is contained in:
@@ -3,6 +3,7 @@ import React, { memo, useEffect, useMemo } from 'react';
|
||||
import AutoSizer from 'react-virtualized-auto-sizer';
|
||||
|
||||
import { GrafanaTheme2 } from '@grafana/data';
|
||||
import { reportInteraction } from '@grafana/runtime';
|
||||
import { FilterInput, useStyles2 } from '@grafana/ui';
|
||||
import { Page } from 'app/core/components/Page/Page';
|
||||
import { GrafanaRouteComponentProps } from 'app/core/navigation/types';
|
||||
@@ -89,8 +90,16 @@ const BrowseDashboardsPage = memo(({ match }: Props) => {
|
||||
title: newValue,
|
||||
});
|
||||
if ('error' in result) {
|
||||
reportInteraction('grafana_browse_dashboards_page_edit_folder_name', {
|
||||
status: 'failed_with_error',
|
||||
error: result.error,
|
||||
});
|
||||
throw result.error;
|
||||
} else {
|
||||
reportInteraction('grafana_browse_dashboards_page_edit_folder_name', { status: 'success' });
|
||||
}
|
||||
} else {
|
||||
reportInteraction('grafana_browse_dashboards_page_edit_folder_name', { status: 'failed_no_folderDTO' });
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user