Traces: Remove serviceMap feature flag (#52375)

* Remove serviceMap feature flag

* Remove import

* Add serviceMap to queryTypeOptions
This commit is contained in:
Joey Tawadrous 2022-07-19 08:00:58 +01:00 committed by GitHub
parent 46eec85b1a
commit 11b743ecd9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 23 deletions

View File

@ -26,7 +26,6 @@ export interface FeatureToggles {
['live-service-web-worker']?: boolean; ['live-service-web-worker']?: boolean;
queryOverLive?: boolean; queryOverLive?: boolean;
panelTitleSearch?: boolean; panelTitleSearch?: boolean;
tempoServiceGraph?: boolean;
tempoApmTable?: boolean; tempoApmTable?: boolean;
prometheus_azure_auth?: boolean; prometheus_azure_auth?: boolean;
prometheusAzureOverrideAudience?: boolean; prometheusAzureOverrideAudience?: boolean;

View File

@ -62,12 +62,6 @@ var (
Description: "Search for dashboards using panel title", Description: "Search for dashboards using panel title",
State: FeatureStateAlpha, State: FeatureStateAlpha,
}, },
{
Name: "tempoServiceGraph",
Description: "show service",
State: FeatureStateBeta,
FrontendOnly: true,
},
{ {
Name: "tempoApmTable", Name: "tempoApmTable",
Description: "Show APM table", Description: "Show APM table",

View File

@ -47,10 +47,6 @@ const (
// Search for dashboards using panel title // Search for dashboards using panel title
FlagPanelTitleSearch = "panelTitleSearch" FlagPanelTitleSearch = "panelTitleSearch"
// FlagTempoServiceGraph
// show service
FlagTempoServiceGraph = "tempoServiceGraph"
// FlagTempoApmTable // FlagTempoApmTable
// Show APM table // Show APM table
FlagTempoApmTable = "tempoApmTable" FlagTempoApmTable = "tempoApmTable"

View File

@ -3,7 +3,7 @@ import React from 'react';
import useAsync from 'react-use/lib/useAsync'; import useAsync from 'react-use/lib/useAsync';
import { QueryEditorProps, SelectableValue } from '@grafana/data'; import { QueryEditorProps, SelectableValue } from '@grafana/data';
import { config, reportInteraction } from '@grafana/runtime'; import { reportInteraction } from '@grafana/runtime';
import { import {
FileDropzone, FileDropzone,
InlineField, InlineField,
@ -75,14 +75,12 @@ class TempoQueryFieldComponent extends React.PureComponent<Props> {
const queryTypeOptions: Array<SelectableValue<TempoQueryType>> = [ const queryTypeOptions: Array<SelectableValue<TempoQueryType>> = [
{ value: 'traceId', label: 'TraceID' }, { value: 'traceId', label: 'TraceID' },
{ value: 'upload', label: 'JSON file' }, { value: 'upload', label: 'JSON file' },
{ value: 'serviceMap', label: 'Service Graph' },
]; ];
if (config.featureToggles.tempoServiceGraph) { // span names in Tempo search links (generated on the service graph page) are in camel case (for Prometheus queries)
queryTypeOptions.push({ value: 'serviceMap', label: 'Service Graph' }); // but the span name dropdown menu in the search tab is lower case
// span names in Tempo search links (generated on the service graph page) are in camel case (for Prometheus queries) query.spanName = query.spanName?.toLowerCase();
// but the span name dropdown menu in the search tab is lower case
query.spanName = query.spanName?.toLowerCase();
}
if (!datasource?.search?.hide) { if (!datasource?.search?.hide) {
queryTypeOptions.unshift({ value: 'nativeSearch', label: 'Search' }); queryTypeOptions.unshift({ value: 'nativeSearch', label: 'Search' });

View File

@ -34,11 +34,9 @@ export const ConfigEditor: React.FC<Props> = ({ options, onOptionsChange }) => {
</div> </div>
) : null} ) : null}
{config.featureToggles.tempoServiceGraph && ( <div className="gf-form-group">
<div className="gf-form-group"> <ServiceGraphSettings options={options} onOptionsChange={onOptionsChange} />
<ServiceGraphSettings options={options} onOptionsChange={onOptionsChange} /> </div>
</div>
)}
<div className="gf-form-group"> <div className="gf-form-group">
<SearchSettings options={options} onOptionsChange={onOptionsChange} /> <SearchSettings options={options} onOptionsChange={onOptionsChange} />