From 11b743ecd90352f0b3892e9c297caf9c53cffe0a Mon Sep 17 00:00:00 2001 From: Joey Tawadrous <90795735+joey-grafana@users.noreply.github.com> Date: Tue, 19 Jul 2022 08:00:58 +0100 Subject: [PATCH] Traces: Remove serviceMap feature flag (#52375) * Remove serviceMap feature flag * Remove import * Add serviceMap to queryTypeOptions --- .../grafana-data/src/types/featureToggles.gen.ts | 1 - pkg/services/featuremgmt/registry.go | 6 ------ pkg/services/featuremgmt/toggles_gen.go | 4 ---- .../datasource/tempo/QueryEditor/QueryField.tsx | 12 +++++------- .../datasource/tempo/configuration/ConfigEditor.tsx | 8 +++----- 5 files changed, 8 insertions(+), 23 deletions(-) diff --git a/packages/grafana-data/src/types/featureToggles.gen.ts b/packages/grafana-data/src/types/featureToggles.gen.ts index 01feba7cc2b..c59f8e728f0 100644 --- a/packages/grafana-data/src/types/featureToggles.gen.ts +++ b/packages/grafana-data/src/types/featureToggles.gen.ts @@ -26,7 +26,6 @@ export interface FeatureToggles { ['live-service-web-worker']?: boolean; queryOverLive?: boolean; panelTitleSearch?: boolean; - tempoServiceGraph?: boolean; tempoApmTable?: boolean; prometheus_azure_auth?: boolean; prometheusAzureOverrideAudience?: boolean; diff --git a/pkg/services/featuremgmt/registry.go b/pkg/services/featuremgmt/registry.go index f596d919ae4..e38dc69157e 100644 --- a/pkg/services/featuremgmt/registry.go +++ b/pkg/services/featuremgmt/registry.go @@ -62,12 +62,6 @@ var ( Description: "Search for dashboards using panel title", State: FeatureStateAlpha, }, - { - Name: "tempoServiceGraph", - Description: "show service", - State: FeatureStateBeta, - FrontendOnly: true, - }, { Name: "tempoApmTable", Description: "Show APM table", diff --git a/pkg/services/featuremgmt/toggles_gen.go b/pkg/services/featuremgmt/toggles_gen.go index a0684dcc9c7..35a6b40560c 100644 --- a/pkg/services/featuremgmt/toggles_gen.go +++ b/pkg/services/featuremgmt/toggles_gen.go @@ -47,10 +47,6 @@ const ( // Search for dashboards using panel title FlagPanelTitleSearch = "panelTitleSearch" - // FlagTempoServiceGraph - // show service - FlagTempoServiceGraph = "tempoServiceGraph" - // FlagTempoApmTable // Show APM table FlagTempoApmTable = "tempoApmTable" diff --git a/public/app/plugins/datasource/tempo/QueryEditor/QueryField.tsx b/public/app/plugins/datasource/tempo/QueryEditor/QueryField.tsx index 16575b152e5..f9bfb4bc56e 100644 --- a/public/app/plugins/datasource/tempo/QueryEditor/QueryField.tsx +++ b/public/app/plugins/datasource/tempo/QueryEditor/QueryField.tsx @@ -3,7 +3,7 @@ import React from 'react'; import useAsync from 'react-use/lib/useAsync'; import { QueryEditorProps, SelectableValue } from '@grafana/data'; -import { config, reportInteraction } from '@grafana/runtime'; +import { reportInteraction } from '@grafana/runtime'; import { FileDropzone, InlineField, @@ -75,14 +75,12 @@ class TempoQueryFieldComponent extends React.PureComponent { const queryTypeOptions: Array> = [ { value: 'traceId', label: 'TraceID' }, { value: 'upload', label: 'JSON file' }, + { value: 'serviceMap', label: 'Service Graph' }, ]; - if (config.featureToggles.tempoServiceGraph) { - queryTypeOptions.push({ value: 'serviceMap', label: 'Service Graph' }); - // span names in Tempo search links (generated on the service graph page) are in camel case (for Prometheus queries) - // but the span name dropdown menu in the search tab is lower case - query.spanName = query.spanName?.toLowerCase(); - } + // span names in Tempo search links (generated on the service graph page) are in camel case (for Prometheus queries) + // but the span name dropdown menu in the search tab is lower case + query.spanName = query.spanName?.toLowerCase(); if (!datasource?.search?.hide) { queryTypeOptions.unshift({ value: 'nativeSearch', label: 'Search' }); diff --git a/public/app/plugins/datasource/tempo/configuration/ConfigEditor.tsx b/public/app/plugins/datasource/tempo/configuration/ConfigEditor.tsx index ee2763991d5..d9662af5828 100644 --- a/public/app/plugins/datasource/tempo/configuration/ConfigEditor.tsx +++ b/public/app/plugins/datasource/tempo/configuration/ConfigEditor.tsx @@ -34,11 +34,9 @@ export const ConfigEditor: React.FC = ({ options, onOptionsChange }) => { ) : null} - {config.featureToggles.tempoServiceGraph && ( -
- -
- )} +
+ +