From e84599bd51706138c40b61582c8d9e5b5b3ad7b1 Mon Sep 17 00:00:00 2001 From: Laura Benz <48948963+L-M-K-B@users.noreply.github.com> Date: Thu, 21 Sep 2023 11:36:09 +0200 Subject: [PATCH] BrowseDashboards: Add tracking for renaming folders (#75160) * feat: add tracking events * feat: add error code to tracking data --- .../features/browse-dashboards/BrowseDashboardsPage.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/public/app/features/browse-dashboards/BrowseDashboardsPage.tsx b/public/app/features/browse-dashboards/BrowseDashboardsPage.tsx index 4b35b39ed76..e52df3958ae 100644 --- a/public/app/features/browse-dashboards/BrowseDashboardsPage.tsx +++ b/public/app/features/browse-dashboards/BrowseDashboardsPage.tsx @@ -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' }); } };