From 0fc9a477792cb152d68c417b972a3fd1cb52a745 Mon Sep 17 00:00:00 2001 From: Sven Grossmann Date: Mon, 8 May 2023 10:53:11 +0200 Subject: [PATCH] Log Context: Add feature tracking of limit change (#67966) * add feature tracking of load more * Update public/app/features/logs/components/log-context/LogRowContextModal.tsx Co-authored-by: Matias Chomicki * fix condition --------- Co-authored-by: Matias Chomicki --- .../logs/components/log-context/LogRowContextModal.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/public/app/features/logs/components/log-context/LogRowContextModal.tsx b/public/app/features/logs/components/log-context/LogRowContextModal.tsx index 411b725c2fc..5de66b363f6 100644 --- a/public/app/features/logs/components/log-context/LogRowContextModal.tsx +++ b/public/app/features/logs/components/log-context/LogRowContextModal.tsx @@ -180,7 +180,14 @@ export const LogRowContextModal: React.FunctionComponent) => { setLoadMoreOption(option); - setLimit(option.value!); + if (option.value) { + setLimit(option.value); + reportInteraction('grafana_explore_logs_log_context_load_more_clicked', { + datasourceType: row.datasourceType, + logRowUid: row.uid, + new_limit: option.value, + }); + } }; const [{ loading }, fetchResults] = useAsyncFn(async () => {