Skip to content

Commit a1d45f5

Browse files
authored
chore: Removing Agent Tracing Backend (#3466)
* chore: Removing Agent Tracing Backend * fixes
1 parent 534cd42 commit a1d45f5

File tree

16 files changed

+9
-165
lines changed

16 files changed

+9
-165
lines changed

api/dataStores.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ components:
193193
type: string
194194
enum:
195195
[
196-
agent,
197196
jaeger,
198197
opensearch,
199198
tempo,

web/src/components/DataStoreIcon/DataStoreIcon.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import {useTheme} from 'styled-components';
22
import {SupportedDataStores} from 'types/DataStore.types';
3-
import Agent from './Icons/Agent';
43
import Elastic from './Icons/Elastic';
54
import Jaeger from './Icons/Jaeger';
65
import Lightstep from './Icons/Lightstep';
@@ -18,7 +17,6 @@ import Dynatrace from './Icons/Dynatrace';
1817
import SumoLogic from './Icons/SumoLogic';
1918

2019
const iconMap = {
21-
[SupportedDataStores.Agent]: Agent,
2220
[SupportedDataStores.JAEGER]: Jaeger,
2321
[SupportedDataStores.SignalFX]: SignalFx,
2422
[SupportedDataStores.ElasticApm]: Elastic,

web/src/components/DataStoreIcon/Icons/Agent.tsx

Lines changed: 0 additions & 14 deletions
This file was deleted.

web/src/components/Inputs/DataStoreSelection/DataStoreSelection.styled.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {CheckCircleOutlined} from '@ant-design/icons';
22
import {Tabs, Typography} from 'antd';
3-
import styled, {css} from 'styled-components';
3+
import styled from 'styled-components';
44

55
const defaultHeight = '100vh - 106px - 60px - 40px';
66

@@ -23,19 +23,12 @@ export const DataStoreListContainer = styled(Tabs)`
2323
}
2424
`;
2525

26-
export const DataStoreItemContainer = styled.div<{$isDisabled: boolean; $isSelected: boolean}>`
26+
export const DataStoreItemContainer = styled.div<{$isSelected: boolean}>`
2727
display: flex;
2828
align-items: center;
2929
gap: 10px;
3030
padding: 12px 22px;
3131
cursor: pointer;
32-
33-
${({$isDisabled}) =>
34-
$isDisabled &&
35-
css`
36-
cursor: not-allowed;
37-
opacity: 0.5;
38-
`}
3932
`;
4033

4134
export const DataStoreName = styled(Typography.Text)<{$isSelected: boolean}>`

web/src/components/Inputs/DataStoreSelection/DataStoreSelection.tsx

Lines changed: 3 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import {Popover, Tabs} from 'antd';
2-
import {useCallback} from 'react';
32
import {noop} from 'lodash';
43
import {useTheme} from 'styled-components';
54
import {ConfigMode, SupportedDataStores} from 'types/DataStore.types';
65
import {SupportedDataStoresToName} from 'constants/DataStore.constants';
7-
import {Flag, useCustomization} from 'providers/Customization';
86
import {useSettingsValues} from 'providers/SettingsValues/SettingsValues.provider';
97

108
import DataStoreIcon from '../../DataStoreIcon/DataStoreIcon';
@@ -18,57 +16,25 @@ interface IProps {
1816
const supportedDataStoreList = Object.values(SupportedDataStores);
1917

2018
const DataStoreSelection = ({onChange = noop, value = SupportedDataStores.JAEGER}: IProps) => {
21-
const {getFlag} = useCustomization();
22-
const isLocalModeEnabled = getFlag(Flag.IsLocalModeEnabled);
2319
const {
2420
color: {text, primary},
2521
} = useTheme();
2622
const {dataStoreConfig} = useSettingsValues();
2723
const configuredDataStoreType = dataStoreConfig.defaultDataStore.type;
2824

29-
const handleChange = useCallback(
30-
dataStore => {
31-
const isDisabled = isLocalModeEnabled && dataStore !== SupportedDataStores.Agent;
32-
33-
if (!isDisabled) onChange(dataStore);
34-
},
35-
[isLocalModeEnabled, onChange]
36-
);
37-
3825
return (
39-
<S.DataStoreListContainer tabPosition="left" onChange={handleChange}>
26+
<S.DataStoreListContainer tabPosition="left" onChange={dataStore => onChange(dataStore as SupportedDataStores)}>
4027
{supportedDataStoreList.map(dataStore => {
41-
if (dataStore === SupportedDataStores.Agent && !getFlag(Flag.IsAgentDataStoreEnabled)) {
42-
return null;
43-
}
44-
4528
const isSelected = value === dataStore;
4629
const isConfigured = configuredDataStoreType === dataStore && dataStoreConfig.mode === ConfigMode.READY;
47-
const isDisabled = isLocalModeEnabled && dataStore !== SupportedDataStores.Agent;
4830

4931
return (
5032
<Tabs.TabPane
5133
key={dataStore}
5234
tab={
53-
<S.DataStoreItemContainer $isDisabled={isDisabled} $isSelected={isSelected} key={dataStore}>
35+
<S.DataStoreItemContainer $isSelected={isSelected} key={dataStore}>
5436
<DataStoreIcon dataStoreType={dataStore} color={isSelected ? primary : text} width="22" height="22" />
55-
56-
{isDisabled ? (
57-
<Popover
58-
content={
59-
<div>
60-
In localMode only the Agent Tracing Backend can be used. <br /> If you want to connect to a
61-
different Tracing Backend <br /> please create a new environment
62-
</div>
63-
}
64-
placement="right"
65-
>
66-
<S.DataStoreName $isSelected={isSelected}>{SupportedDataStoresToName[dataStore]}</S.DataStoreName>
67-
</Popover>
68-
) : (
69-
<S.DataStoreName $isSelected={isSelected}>{SupportedDataStoresToName[dataStore]}</S.DataStoreName>
70-
)}
71-
37+
<S.DataStoreName $isSelected={isSelected}>{SupportedDataStoresToName[dataStore]}</S.DataStoreName>
7238
{isConfigured && (
7339
<Popover content="This data source is currently configured" placement="right">
7440
<S.InfoIcon />

web/src/components/Settings/DataStorePlugin/DataStoreComponentFactory.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ interface IProps {
66
}
77

88
const DataStoreComponentFactory = ({dataStoreType = SupportedDataStores.JAEGER}: IProps) => {
9-
const FormComponent = DataStorePlugin[dataStoreType];
9+
const FormComponent = DataStorePlugin[dataStoreType] || DataStorePlugin[SupportedDataStores.OtelCollector];
1010

1111
return <FormComponent />;
1212
};

web/src/components/Settings/DataStorePlugin/DataStorePlugin.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import {IDataStorePluginMap, SupportedDataStores} from 'types/DataStore.types';
2-
import Agent from './forms/Agent';
32
import GrpcClient from './forms/GrpcClient';
43
import ElasticSearch from './forms/ElasticSearch';
54
import OpenTelemetryCollector from './forms/OpenTelemetryCollector';
@@ -10,7 +9,6 @@ import AzureAppInsights from './forms/AzureAppInsights/AzureAppInsights';
109
import SumoLogic from './forms/SumoLogic';
1110

1211
export const DataStoreComponentMap: IDataStorePluginMap = {
13-
[SupportedDataStores.Agent]: Agent,
1412
[SupportedDataStores.JAEGER]: GrpcClient,
1513
[SupportedDataStores.TEMPO]: BaseClient,
1614
[SupportedDataStores.SignalFX]: SignalFx,

web/src/components/Settings/DataStorePlugin/forms/Agent/Agent.styled.ts

Lines changed: 0 additions & 24 deletions
This file was deleted.

web/src/components/Settings/DataStorePlugin/forms/Agent/Agent.tsx

Lines changed: 0 additions & 20 deletions
This file was deleted.

web/src/components/Settings/DataStorePlugin/forms/Agent/Ingestor.tsx

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)