mirror of
https://github.com/grafana/grafana.git
synced 2025-07-30 04:22:14 +08:00
Loki: Enable Query Splitting by default (#72094)
* lokiQuerySplitting: enable feature flag by default * Query stats: add special note for stats + splitting
This commit is contained in:
@ -34,6 +34,7 @@ Some features are enabled by default. You can disable these feature by setting t
|
|||||||
| `disablePrometheusExemplarSampling` | Disable Prometheus exemplar sampling | |
|
| `disablePrometheusExemplarSampling` | Disable Prometheus exemplar sampling | |
|
||||||
| `logsSampleInExplore` | Enables access to the logs sample feature in Explore | Yes |
|
| `logsSampleInExplore` | Enables access to the logs sample feature in Explore | Yes |
|
||||||
| `logsContextDatasourceUi` | Allow datasource to provide custom UI for context view | Yes |
|
| `logsContextDatasourceUi` | Allow datasource to provide custom UI for context view | Yes |
|
||||||
|
| `lokiQuerySplitting` | Split large interval queries into subqueries with smaller time intervals | Yes |
|
||||||
| `prometheusMetricEncyclopedia` | Adds the metrics explorer component to the Prometheus query builder as an option in metric select | Yes |
|
| `prometheusMetricEncyclopedia` | Adds the metrics explorer component to the Prometheus query builder as an option in metric select | Yes |
|
||||||
| `prometheusDataplane` | Changes responses to from Prometheus to be compliant with the dataplane specification. In particular it sets the numeric Field.Name from 'Value' to the value of the `__name__` label when present. | Yes |
|
| `prometheusDataplane` | Changes responses to from Prometheus to be compliant with the dataplane specification. In particular it sets the numeric Field.Name from 'Value' to the value of the `__name__` label when present. | Yes |
|
||||||
| `lokiMetricDataplane` | Changes metric responses from Loki to be compliant with the dataplane specification. | Yes |
|
| `lokiMetricDataplane` | Changes metric responses from Loki to be compliant with the dataplane specification. | Yes |
|
||||||
@ -90,7 +91,6 @@ Experimental features might be changed or removed without prior notice.
|
|||||||
| `nestedFolderPicker` | Enables the still in-development new folder picker to support nested folders |
|
| `nestedFolderPicker` | Enables the still in-development new folder picker to support nested folders |
|
||||||
| `alertingBacktesting` | Rule backtesting API for alerting |
|
| `alertingBacktesting` | Rule backtesting API for alerting |
|
||||||
| `editPanelCSVDragAndDrop` | Enables drag and drop for CSV and Excel files |
|
| `editPanelCSVDragAndDrop` | Enables drag and drop for CSV and Excel files |
|
||||||
| `lokiQuerySplitting` | Split large interval queries into subqueries with smaller time intervals |
|
|
||||||
| `lokiQuerySplittingConfig` | Give users the option to configure split durations for Loki queries |
|
| `lokiQuerySplittingConfig` | Give users the option to configure split durations for Loki queries |
|
||||||
| `individualCookiePreferences` | Support overriding cookie preferences per user |
|
| `individualCookiePreferences` | Support overriding cookie preferences per user |
|
||||||
| `onlyExternalOrgRoleSync` | Prohibits a user from changing organization roles synced with external auth providers |
|
| `onlyExternalOrgRoleSync` | Prohibits a user from changing organization roles synced with external auth providers |
|
||||||
|
@ -305,9 +305,10 @@ var (
|
|||||||
{
|
{
|
||||||
Name: "lokiQuerySplitting",
|
Name: "lokiQuerySplitting",
|
||||||
Description: "Split large interval queries into subqueries with smaller time intervals",
|
Description: "Split large interval queries into subqueries with smaller time intervals",
|
||||||
Stage: FeatureStageExperimental,
|
Stage: FeatureStageGeneralAvailability,
|
||||||
FrontendOnly: true,
|
FrontendOnly: true,
|
||||||
Owner: grafanaObservabilityLogsSquad,
|
Owner: grafanaObservabilityLogsSquad,
|
||||||
|
Expression: "true", // turned on by default
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "lokiQuerySplittingConfig",
|
Name: "lokiQuerySplittingConfig",
|
||||||
|
@ -43,7 +43,7 @@ editPanelCSVDragAndDrop,experimental,@grafana/grafana-bi-squad,false,false,false
|
|||||||
alertingNoNormalState,preview,@grafana/alerting-squad,false,false,false,false
|
alertingNoNormalState,preview,@grafana/alerting-squad,false,false,false,false
|
||||||
logsSampleInExplore,GA,@grafana/observability-logs,false,false,false,true
|
logsSampleInExplore,GA,@grafana/observability-logs,false,false,false,true
|
||||||
logsContextDatasourceUi,GA,@grafana/observability-logs,false,false,false,true
|
logsContextDatasourceUi,GA,@grafana/observability-logs,false,false,false,true
|
||||||
lokiQuerySplitting,experimental,@grafana/observability-logs,false,false,false,true
|
lokiQuerySplitting,GA,@grafana/observability-logs,false,false,false,true
|
||||||
lokiQuerySplittingConfig,experimental,@grafana/observability-logs,false,false,false,true
|
lokiQuerySplittingConfig,experimental,@grafana/observability-logs,false,false,false,true
|
||||||
individualCookiePreferences,experimental,@grafana/backend-platform,false,false,false,false
|
individualCookiePreferences,experimental,@grafana/backend-platform,false,false,false,false
|
||||||
onlyExternalOrgRoleSync,experimental,@grafana/grafana-authnz-team,false,false,false,false
|
onlyExternalOrgRoleSync,experimental,@grafana/grafana-authnz-team,false,false,false,false
|
||||||
|
|
@ -4,7 +4,8 @@ import { useToggle } from 'react-use';
|
|||||||
|
|
||||||
import { getValueFormat, GrafanaTheme2 } from '@grafana/data';
|
import { getValueFormat, GrafanaTheme2 } from '@grafana/data';
|
||||||
import { Stack } from '@grafana/experimental';
|
import { Stack } from '@grafana/experimental';
|
||||||
import { Collapse, useStyles2 } from '@grafana/ui';
|
import { config } from '@grafana/runtime';
|
||||||
|
import { Collapse, Icon, Tooltip, useStyles2 } from '@grafana/ui';
|
||||||
import { QueryStats } from 'app/plugins/datasource/loki/types';
|
import { QueryStats } from 'app/plugins/datasource/loki/types';
|
||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
@ -45,6 +46,11 @@ export function QueryOptionGroup({ title, children, collapsedInfo, queryStats }:
|
|||||||
>
|
>
|
||||||
<div className={styles.body}>{children}</div>
|
<div className={styles.body}>{children}</div>
|
||||||
</Collapse>
|
</Collapse>
|
||||||
|
{queryStats && config.featureToggles.lokiQuerySplitting && (
|
||||||
|
<Tooltip content="Note: the query will be split into multiple parts and executed in sequence. Query limits will only apply each individual part.">
|
||||||
|
<Icon tabIndex={0} name="info-circle" className={styles.tooltip} size="sm" />
|
||||||
|
</Tooltip>
|
||||||
|
)}
|
||||||
{queryStats && <p className={styles.stats}>This query will process approximately {convertUnits()}.</p>}
|
{queryStats && <p className={styles.stats}>This query will process approximately {convertUnits()}.</p>}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
@ -92,5 +98,8 @@ const getStyles = (theme: GrafanaTheme2) => {
|
|||||||
color: theme.colors.text.secondary,
|
color: theme.colors.text.secondary,
|
||||||
fontSize: theme.typography.bodySmall.fontSize,
|
fontSize: theme.typography.bodySmall.fontSize,
|
||||||
}),
|
}),
|
||||||
|
tooltip: css({
|
||||||
|
marginRight: theme.spacing(0.25),
|
||||||
|
}),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user