From 8c2a74147b1e70eec8fb6f9fd960a76360521385 Mon Sep 17 00:00:00 2001 From: "Grot (@grafanabot)" <43478413+grafanabot@users.noreply.github.com> Date: Mon, 8 May 2023 10:48:14 +0100 Subject: [PATCH] [v10.0.x] Log Context: Add feature tracking of limit change (#67980) 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 (cherry picked from commit 0fc9a477792cb152d68c417b972a3fd1cb52a745) Co-authored-by: Sven Grossmann --- .../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 () => {