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;
queryOverLive?: boolean;
panelTitleSearch?: boolean;
tempoServiceGraph?: boolean;
tempoApmTable?: boolean;
prometheus_azure_auth?: boolean;
prometheusAzureOverrideAudience?: boolean;

View File

@ -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",

View File

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

View File

@ -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<Props> {
const queryTypeOptions: Array<SelectableValue<TempoQueryType>> = [
{ 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' });

View File

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