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 <matyax@gmail.com>

* fix condition

---------

Co-authored-by: Matias Chomicki <matyax@gmail.com>
This commit is contained in:
Sven Grossmann 2023-05-08 10:53:11 +02:00 committed by GitHub
parent 17a3c0c101
commit 0fc9a47779
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -180,7 +180,14 @@ export const LogRowContextModal: React.FunctionComponent<LogRowContextModalProps
const onChangeLimitOption = (option: SelectableValue<number>) => {
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 () => {