loki: rename experimental feature flag (#70306)

pull/70315/head
Gábor Farkas 2 years ago committed by GitHub
parent 6a3c6eb174
commit 271cdb4baa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md
  2. 2
      packages/grafana-data/src/types/featureToggles.gen.ts
  3. 4
      pkg/services/featuremgmt/registry.go
  4. 2
      pkg/services/featuremgmt/toggles_gen.csv
  5. 6
      pkg/services/featuremgmt/toggles_gen.go
  6. 2
      public/app/plugins/datasource/loki/components/LokiOptionFields.tsx
  7. 6
      public/app/plugins/datasource/loki/datasource.ts

@ -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 | | `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 | | `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 | | `storage` | Configurable storage for dashboards, datasources, and resources |
| `newTraceViewHeader` | Shows the new trace view header | | `newTraceViewHeader` | Shows the new trace view header |
| `datasourceQueryMultiStatus` | Introduce HTTP 207 Multi Status for api/ds/query | | `datasourceQueryMultiStatus` | Introduce HTTP 207 Multi Status for api/ds/query |

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

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

@ -7,7 +7,7 @@ panelTitleSearch,preview,@grafana/grafana-app-platform-squad,false,false,false,f
prometheusAzureOverrideAudience,preview,@grafana/observability-metrics,false,false,false,false prometheusAzureOverrideAudience,preview,@grafana/observability-metrics,false,false,false,false
publicDashboards,preview,@grafana/dashboards-squad,false,false,false,false publicDashboards,preview,@grafana/dashboards-squad,false,false,false,false
publicDashboardsEmailSharing,preview,@grafana/dashboards-squad,false,true,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 featureHighlights,GA,@grafana/grafana-as-code,false,false,false,false
migrationLocking,preview,@grafana/backend-platform,false,false,false,false migrationLocking,preview,@grafana/backend-platform,false,false,false,false
storage,experimental,@grafana/grafana-app-platform-squad,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

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

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

@ -263,7 +263,11 @@ export class LokiDatasource
}; };
const streamQueries = fixedRequest.targets.filter((q) => q.queryType === LokiQueryType.Stream); 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, // this is still an in-development feature,
// we do not support mixing stream-queries with normal-queries for now. // we do not support mixing stream-queries with normal-queries for now.
const streamRequest = { const streamRequest = {

Loading…
Cancel
Save