Tempo: Consider tempo search out of beta and remove beta badge and feature flags (#50030)

* Tempo: Remove beta notice and feature flag for search

* remove unused imports
This commit is contained in:
Connor Lindsey 2022-06-01 11:32:10 -06:00 committed by GitHub
parent dca0453c2e
commit 3fff17af63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 9 additions and 54 deletions

View File

@ -96,15 +96,11 @@ Tempo search is an experimental feature behind a feature toggle. Use this to sea
#### Search recent traces #### Search recent traces
Tempo allows you to search recent traces held in the ingesters. By default, ingesters store the last 15 minutes of tracing data, and this search is disabled. Enable this search capability by setting the `tempoSearch` feature toggle. Tempo allows you to search recent traces held in the ingesters. By default, ingesters store the last 15 minutes of tracing data. You must configure your Tempo data source to use this feature. Refer to the [Tempo documentation](https://grafana.com/docs/tempo/latest/getting-started/tempo-in-grafana/#search-of-recent-traces).
You must also configure your Tempo data source to use this feature. Refer to the [Tempo documentation](https://grafana.com/docs/tempo/latest/getting-started/tempo-in-grafana/#search-of-recent-traces).
#### Search backend datastore #### Search backend datastore
Tempo includes the ability to search the entire backend datastore. You can enable this capability by setting the `tempoSearch` and `tempoBackendSearch` feature toggles. Tempo includes the ability to search the entire backend datastore. You must configure your Tempo data source to use this feature. Refer to the [Tempo documentation](https://grafana.com/docs/tempo/latest/getting-started/tempo-in-grafana/#search-of-the-backend-datastore).
You must also configure your Tempo data source to use this feature.Refer to the [Tempo documentation](https://grafana.com/docs/tempo/latest/getting-started/tempo-in-grafana/#search-of-the-backend-datastore).
### Loki search ### Loki search

View File

@ -27,8 +27,6 @@ export interface FeatureToggles {
['live-service-web-worker']?: boolean; ['live-service-web-worker']?: boolean;
queryOverLive?: boolean; queryOverLive?: boolean;
panelTitleSearch?: boolean; panelTitleSearch?: boolean;
tempoSearch?: boolean;
tempoBackendSearch?: boolean;
tempoServiceGraph?: boolean; tempoServiceGraph?: boolean;
lokiBackendMode?: boolean; lokiBackendMode?: boolean;
prometheus_azure_auth?: boolean; prometheus_azure_auth?: boolean;

View File

@ -66,17 +66,6 @@ var (
Description: "Search for dashboards using panel title", Description: "Search for dashboards using panel title",
State: FeatureStateAlpha, State: FeatureStateAlpha,
}, },
{
Name: "tempoSearch",
Description: "Enable searching in tempo datasources",
State: FeatureStateBeta,
FrontendOnly: true,
},
{
Name: "tempoBackendSearch",
Description: "Use backend for tempo search",
State: FeatureStateBeta,
},
{ {
Name: "tempoServiceGraph", Name: "tempoServiceGraph",
Description: "show service", Description: "show service",

View File

@ -51,14 +51,6 @@ const (
// Search for dashboards using panel title // Search for dashboards using panel title
FlagPanelTitleSearch = "panelTitleSearch" FlagPanelTitleSearch = "panelTitleSearch"
// FlagTempoSearch
// Enable searching in tempo datasources
FlagTempoSearch = "tempoSearch"
// FlagTempoBackendSearch
// Use backend for tempo search
FlagTempoBackendSearch = "tempoBackendSearch"
// FlagTempoServiceGraph // FlagTempoServiceGraph
// show service // show service
FlagTempoServiceGraph = "tempoServiceGraph" FlagTempoServiceGraph = "tempoServiceGraph"

View File

@ -5,7 +5,6 @@ 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 { config, reportInteraction } from '@grafana/runtime';
import { import {
Badge,
FileDropzone, FileDropzone,
InlineField, InlineField,
InlineFieldRow, InlineFieldRow,
@ -82,12 +81,12 @@ class TempoQueryFieldComponent extends React.PureComponent<Props> {
queryTypeOptions.push({ value: 'serviceMap', label: 'Service Graph' }); queryTypeOptions.push({ value: 'serviceMap', label: 'Service Graph' });
} }
if (config.featureToggles.tempoSearch && !datasource?.search?.hide) { if (!datasource?.search?.hide) {
queryTypeOptions.unshift({ value: 'nativeSearch', label: 'Search - Beta' }); queryTypeOptions.unshift({ value: 'nativeSearch', label: 'Search' });
} }
if (logsDatasourceUid) { if (logsDatasourceUid) {
if (!config.featureToggles.tempoSearch) { if (datasource?.search?.hide) {
// Place at beginning as Search if no native search // Place at beginning as Search if no native search
queryTypeOptions.unshift({ value: 'search', label: 'Search' }); queryTypeOptions.unshift({ value: 'search', label: 'Search' });
} else { } else {
@ -122,20 +121,6 @@ class TempoQueryFieldComponent extends React.PureComponent<Props> {
/> />
</InlineField> </InlineField>
</InlineFieldRow> </InlineFieldRow>
{query.queryType === 'nativeSearch' && (
<div style={{ maxWidth: '65ch' }}>
<Badge icon="rocket" text="Beta" color="blue" />
{config.featureToggles.tempoBackendSearch ? (
<>&nbsp;Tempo search is currently in beta.</>
) : (
<>
&nbsp;Tempo search is currently in beta and is designed to return recent traces only. It ignores the
time range picker. We are actively working on full backend search. Look for improvements in the near
future!
</>
)}
</div>
)}
{query.queryType === 'search' && ( {query.queryType === 'search' && (
<SearchSection <SearchSection
logsDatasourceUid={logsDatasourceUid} logsDatasourceUid={logsDatasourceUid}

View File

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

View File

@ -14,7 +14,6 @@ import {
ScopedVars, ScopedVars,
} from '@grafana/data'; } from '@grafana/data';
import { import {
config,
BackendSrvRequest, BackendSrvRequest,
DataSourceWithBackend, DataSourceWithBackend,
getBackendSrv, getBackendSrv,
@ -169,9 +168,7 @@ export class TempoDatasource extends DataSourceWithBackend<TempoQuery, TempoJson
search: targets.nativeSearch[0].search ?? '', search: targets.nativeSearch[0].search ?? '',
}); });
const timeRange = config.featureToggles.tempoBackendSearch const timeRange = { startTime: options.range.from.unix(), endTime: options.range.to.unix() };
? { startTime: options.range.from.unix(), endTime: options.range.to.unix() }
: undefined;
const query = this.applyVariables(targets.nativeSearch[0], options.scopedVars); const query = this.applyVariables(targets.nativeSearch[0], options.scopedVars);
const searchQuery = this.buildSearchQuery(query, timeRange); const searchQuery = this.buildSearchQuery(query, timeRange);
subQueries.push( subQueries.push(