loki: rename experimental feature flag (#70306)

This commit is contained in:
Gábor Farkas 2023-06-19 12:03:51 +02:00 committed by GitHub
parent 6a3c6eb174
commit 271cdb4baa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 14 additions and 10 deletions

View File

@ -75,7 +75,7 @@ Experimental features might be changed or removed without prior notice.
| ---------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| `live-service-web-worker` | This will use a webworker thread to processes events rather than the main thread |
| `queryOverLive` | Use Grafana Live WebSocket to execute backend queries |
| `lokiLive` | Support WebSocket streaming for loki (early prototype) |
| `lokiExperimentalStreaming` | Support new streaming approach for loki (prototype, needs special loki build) |
| `storage` | Configurable storage for dashboards, datasources, and resources |
| `newTraceViewHeader` | Shows the new trace view header |
| `datasourceQueryMultiStatus` | Introduce HTTP 207 Multi Status for api/ds/query |

View File

@ -26,7 +26,7 @@ export interface FeatureToggles {
prometheusAzureOverrideAudience?: boolean;
publicDashboards?: boolean;
publicDashboardsEmailSharing?: boolean;
lokiLive?: boolean;
lokiExperimentalStreaming?: boolean;
featureHighlights?: boolean;
migrationLocking?: boolean;
storage?: boolean;

View File

@ -62,8 +62,8 @@ var (
HideFromDocs: true,
},
{
Name: "lokiLive",
Description: "Support WebSocket streaming for loki (early prototype)",
Name: "lokiExperimentalStreaming",
Description: "Support new streaming approach for loki (prototype, needs special loki build)",
Stage: FeatureStageExperimental,
Owner: grafanaObservabilityLogsSquad,
},

View File

@ -7,7 +7,7 @@ panelTitleSearch,preview,@grafana/grafana-app-platform-squad,false,false,false,f
prometheusAzureOverrideAudience,preview,@grafana/observability-metrics,false,false,false,false
publicDashboards,preview,@grafana/dashboards-squad,false,false,false,false
publicDashboardsEmailSharing,preview,@grafana/dashboards-squad,false,true,false,false
lokiLive,experimental,@grafana/observability-logs,false,false,false,false
lokiExperimentalStreaming,experimental,@grafana/observability-logs,false,false,false,false
featureHighlights,GA,@grafana/grafana-as-code,false,false,false,false
migrationLocking,preview,@grafana/backend-platform,false,false,false,false
storage,experimental,@grafana/grafana-app-platform-squad,false,false,false,false

1 Name Stage Owner requiresDevMode RequiresLicense RequiresRestart FrontendOnly
7 prometheusAzureOverrideAudience preview @grafana/observability-metrics false false false false
8 publicDashboards preview @grafana/dashboards-squad false false false false
9 publicDashboardsEmailSharing preview @grafana/dashboards-squad false true false false
10 lokiLive lokiExperimentalStreaming experimental @grafana/observability-logs false false false false
11 featureHighlights GA @grafana/grafana-as-code false false false false
12 migrationLocking preview @grafana/backend-platform false false false false
13 storage experimental @grafana/grafana-app-platform-squad false false false false

View File

@ -39,9 +39,9 @@ const (
// Enables public dashboard sharing to be restricted to only allowed emails
FlagPublicDashboardsEmailSharing = "publicDashboardsEmailSharing"
// FlagLokiLive
// Support WebSocket streaming for loki (early prototype)
FlagLokiLive = "lokiLive"
// FlagLokiExperimentalStreaming
// Support new streaming approach for loki (prototype, needs special loki build)
FlagLokiExperimentalStreaming = "lokiExperimentalStreaming"
// FlagFeatureHighlights
// Highlight Grafana Enterprise features

View File

@ -28,7 +28,7 @@ export const queryTypeOptions: Array<SelectableValue<LokiQueryType>> = [
},
];
if (config.featureToggles.lokiLive) {
if (config.featureToggles.lokiExperimentalStreaming) {
queryTypeOptions.push({
value: LokiQueryType.Stream,
label: 'Stream',

View File

@ -263,7 +263,11 @@ export class LokiDatasource
};
const streamQueries = fixedRequest.targets.filter((q) => q.queryType === LokiQueryType.Stream);
if (config.featureToggles.lokiLive && streamQueries.length > 0 && fixedRequest.rangeRaw?.to === 'now') {
if (
config.featureToggles.lokiExperimentalStreaming &&
streamQueries.length > 0 &&
fixedRequest.rangeRaw?.to === 'now'
) {
// this is still an in-development feature,
// we do not support mixing stream-queries with normal-queries for now.
const streamRequest = {