From 8246fc64fad7ce2989fd4fe5de5b7c8a1bcad182 Mon Sep 17 00:00:00 2001 From: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com> Date: Thu, 26 Jan 2023 16:23:13 +0100 Subject: [PATCH] Explore: Trigger logs sample only when user click to see it (#62226) LogSamples: Trigger log samples on user action --- public/app/features/explore/utils/supplementaryQueries.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/public/app/features/explore/utils/supplementaryQueries.ts b/public/app/features/explore/utils/supplementaryQueries.ts index cef393d2401..bb00172523f 100644 --- a/public/app/features/explore/utils/supplementaryQueries.ts +++ b/public/app/features/explore/utils/supplementaryQueries.ts @@ -17,7 +17,7 @@ export const loadSupplementaryQueries = (): SupplementaryQueries => { // We default to true for all supp queries let supplementaryQueries: SupplementaryQueries = { [SupplementaryQueryType.LogsVolume]: { enabled: true }, - [SupplementaryQueryType.LogsSample]: { enabled: true }, + [SupplementaryQueryType.LogsSample]: { enabled: false }, }; for (const type of supplementaryQueryTypes) { @@ -36,6 +36,11 @@ export const loadSupplementaryQueries = (): SupplementaryQueries => { } } + // We want to skip LogsSample and default it to false for now to trigger it only on user action + if (type === SupplementaryQueryType.LogsSample) { + continue; + } + // Only if "false" value in local storage, we disable it const shouldBeEnabled = store.get(getSupplementaryQuerySettingKey(type)); if (shouldBeEnabled === 'false') {