Commit 376765b3 by Andrej Ocenas Committed by GitHub

Tracing: Remove feature flag (#23834)

parent de1e70a4
......@@ -39,7 +39,6 @@ export interface FeatureToggles {
*/
meta: boolean;
newVariables: boolean;
tracingIntegration: boolean;
}
/**
......
......@@ -53,7 +53,6 @@ export class GrafanaBootConfig implements GrafanaConfig {
newEdit: false,
meta: false,
newVariables: true,
tracingIntegration: false,
};
licenseInfo: LicenseInfo = {} as LicenseInfo;
rendererAvailable = false;
......
......@@ -222,14 +222,6 @@ func (scanner *PluginScanner) walker(currentPath string, f os.FileInfo, err erro
return nil
}
if !scanner.cfg.FeatureToggles["tracingIntegration"] {
// Do not load tracing datasources if
prefix := path.Join(setting.StaticRootPath, "app/plugins/datasource")
if strings.Contains(currentPath, path.Join(prefix, "jaeger")) || strings.Contains(currentPath, path.Join(prefix, "zipkin")) {
return nil
}
}
if f.Name() == "plugin.json" {
err := scanner.loadPluginJson(currentPath)
if err != nil {
......
......@@ -29,7 +29,7 @@ describe('buildCategories', () => {
const categories = buildCategories(plugins);
it('should group plugins into categories', () => {
expect(categories.length).toBe(6);
expect(categories.length).toBe(7);
expect(categories[0].title).toBe('Time series databases');
expect(categories[0].plugins.length).toBe(2);
expect(categories[1].title).toBe('Logging & document databases');
......@@ -40,17 +40,17 @@ describe('buildCategories', () => {
});
it('should add phantom plugin for Grafana cloud', () => {
expect(categories[3].title).toBe('Cloud');
expect(categories[3].plugins.length).toBe(2);
expect(categories[3].plugins[1].id).toBe('gcloud');
expect(categories[4].title).toBe('Cloud');
expect(categories[4].plugins.length).toBe(2);
expect(categories[4].plugins[1].id).toBe('gcloud');
});
it('should set module to phantom on phantom plugins', () => {
expect(categories[4].plugins[0].module).toBe('phantom');
expect(categories[5].plugins[0].module).toBe('phantom');
});
it('should add enterprise phantom plugins', () => {
expect(categories[4].title).toBe('Enterprise plugins');
expect(categories[4].plugins.length).toBe(6);
expect(categories[5].title).toBe('Enterprise plugins');
expect(categories[5].plugins.length).toBe(6);
});
});
import { DataSourcePluginMeta, PluginType } from '@grafana/data';
import { DataSourcePluginCategory } from 'app/types';
import { config } from '@grafana/runtime';
export function buildCategories(plugins: DataSourcePluginMeta[]): DataSourcePluginCategory[] {
const categories: DataSourcePluginCategory[] = [
{ id: 'tsdb', title: 'Time series databases', plugins: [] },
{ id: 'logging', title: 'Logging & document databases', plugins: [] },
config.featureToggles.tracingIntegration ? { id: 'tracing', title: 'Distributed tracing', plugins: [] } : null,
{ id: 'tracing', title: 'Distributed tracing', plugins: [] },
{ id: 'sql', title: 'SQL', plugins: [] },
{ id: 'cloud', title: 'Cloud', plugins: [] },
{ id: 'enterprise', title: 'Enterprise plugins', plugins: [] },
......
......@@ -3,14 +3,6 @@ import { shallow } from 'enzyme';
import { DerivedField } from './DerivedField';
import DataSourcePicker from '../../../../core/components/Select/DataSourcePicker';
jest.mock('app/core/config', () => ({
config: {
featureToggles: {
tracingIntegration: true,
},
},
}));
jest.mock('app/features/plugins/datasource_srv', () => ({
getDatasourceSrv() {
return {
......
......@@ -8,7 +8,6 @@ import { DataSourceSelectItem } from '@grafana/data';
import { DerivedFieldConfig } from '../types';
import DataSourcePicker from 'app/core/components/Select/DataSourcePicker';
import { getDatasourceSrv } from 'app/features/plugins/datasource_srv';
import { config } from 'app/core/config';
import { usePrevious } from 'react-use';
const getStyles = stylesFactory(() => ({
......@@ -113,35 +112,33 @@ export const DerivedField = (props: Props) => {
`}
/>
{config.featureToggles.tracingIntegration && (
<div className={styles.row}>
<Switch
label="Internal link"
checked={showInternalLink}
onChange={() => {
if (showInternalLink) {
onChange({
...value,
datasourceUid: undefined,
});
}
setShowInternalLink(!showInternalLink);
<div className={styles.row}>
<Switch
label="Internal link"
checked={showInternalLink}
onChange={() => {
if (showInternalLink) {
onChange({
...value,
datasourceUid: undefined,
});
}
setShowInternalLink(!showInternalLink);
}}
/>
{showInternalLink && (
<DataSourceSection
onChange={datasourceUid => {
onChange({
...value,
datasourceUid,
});
}}
datasourceUid={value.datasourceUid}
/>
{showInternalLink && (
<DataSourceSection
onChange={datasourceUid => {
onChange({
...value,
datasourceUid,
});
}}
datasourceUid={value.datasourceUid}
/>
)}
</div>
)}
)}
</div>
</div>
);
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment