From 89d1ab37de111a188b459669e3cc383e3b0c516d Mon Sep 17 00:00:00 2001 From: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com> Date: Thu, 6 Feb 2020 11:06:26 +0100 Subject: [PATCH] Elastic: Limit the number of datapoints for the counts query (#21937) --- public/app/features/explore/state/actions.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/public/app/features/explore/state/actions.ts b/public/app/features/explore/state/actions.ts index 8a94715c10e..01d68e5cd5f 100644 --- a/public/app/features/explore/state/actions.ts +++ b/public/app/features/explore/state/actions.ts @@ -428,9 +428,11 @@ export const runQueries = (exploreId: ExploreId): ThunkResult => { const queryOptions: QueryOptions = { minInterval, - // This is used for logs streaming for buffer size, with undefined it falls back to datasource config if it - // supports that. - maxDataPoints: mode === ExploreMode.Logs ? undefined : containerWidth, + // maxDataPoints is used in: + // Loki - used for logs streaming for buffer size, with undefined it falls back to datasource config if it supports that. + // Elastic - limits the number of datapoints for the counts query and for logs it has hardcoded limit. + // Influx - used to correctly display logs in graph + maxDataPoints: mode === ExploreMode.Logs && datasourceInstance.name === 'Loki' ? undefined : containerWidth, liveStreaming: live, showingGraph, showingTable,