diff --git a/web/src/components/Settings/DataStorePlugin/forms/Agent/Agent.tsx b/web/src/components/Settings/DataStorePlugin/forms/Agent/Agent.tsx
index dbe5c09b48..088fe71eec 100644
--- a/web/src/components/Settings/DataStorePlugin/forms/Agent/Agent.tsx
+++ b/web/src/components/Settings/DataStorePlugin/forms/Agent/Agent.tsx
@@ -1,12 +1,20 @@
import {Col, Row} from 'antd';
import Ingestor from './Ingestor';
+import Configuration from '../OpenTelemetryCollector/Configuration';
const Agent = () => (
-
-
-
-
-
+ <>
+
+
+
+
+
+
+
+
+
+
+ >
);
export default Agent;
diff --git a/web/src/components/Settings/DataStorePlugin/forms/OpenTelemetryCollector/Configuration.tsx b/web/src/components/Settings/DataStorePlugin/forms/OpenTelemetryCollector/Configuration.tsx
index 6d4ca68764..58b6ac54ea 100644
--- a/web/src/components/Settings/DataStorePlugin/forms/OpenTelemetryCollector/Configuration.tsx
+++ b/web/src/components/Settings/DataStorePlugin/forms/OpenTelemetryCollector/Configuration.tsx
@@ -2,6 +2,7 @@ import {Col, Form, Row} from 'antd';
import {CollectorConfigMap} from 'constants/CollectorConfig.constants';
import {TCollectorDataStores, TDraftDataStore} from 'types/DataStore.types';
import {FramedCodeBlock} from 'components/CodeBlock';
+import {withCustomization} from 'providers/Customization';
import * as S from './OpenTelemetryCollector.styled';
import DataStoreDocsBanner from '../../../DataStoreDocsBanner/DataStoreDocsBanner';
@@ -34,4 +35,4 @@ const Configuration = () => {
);
};
-export default Configuration;
+export default withCustomization(Configuration, 'collectorConfiguration');
diff --git a/web/src/components/Settings/DataStorePlugin/forms/OpenTelemetryCollector/Ingestor.tsx b/web/src/components/Settings/DataStorePlugin/forms/OpenTelemetryCollector/Ingestor.tsx
index 727f2aa150..ba40f9c412 100644
--- a/web/src/components/Settings/DataStorePlugin/forms/OpenTelemetryCollector/Ingestor.tsx
+++ b/web/src/components/Settings/DataStorePlugin/forms/OpenTelemetryCollector/Ingestor.tsx
@@ -1,6 +1,7 @@
import {Form, Switch} from 'antd';
import DocsBanner from 'components/DocsBanner/DocsBanner';
import {INGESTOR_ENDPOINT_URL} from 'constants/Common.constants';
+import {withCustomization} from 'providers/Customization';
import {TCollectorDataStores, TDraftDataStore} from 'types/DataStore.types';
import * as S from './OpenTelemetryCollector.styled';
@@ -39,4 +40,4 @@ const Ingestor = () => {
);
};
-export default Ingestor;
+export default withCustomization(Ingestor, 'ingestorConfiguration');
diff --git a/web/src/constants/CollectorConfig.constants.ts b/web/src/constants/CollectorConfig.constants.ts
index 97aa875621..c5b92935a3 100644
--- a/web/src/constants/CollectorConfig.constants.ts
+++ b/web/src/constants/CollectorConfig.constants.ts
@@ -1,6 +1,12 @@
-import {SupportedDataStores} from '../types/DataStore.types';
+import {SupportedDataStores} from 'types/DataStore.types';
-export const Lightstep = `receivers:
+export const tracetest = `# OTLP for Tracetest
+ otlp/tracetest:
+ endpoint: tracetest:4317 # Send traces to Tracetest. Read more in docs here: https://docs.tracetest.io/configuration/connecting-to-data-stores/opentelemetry-collector
+ tls:
+ insecure: true`;
+
+export const Lightstep = (traceTestBlock: string) => `receivers:
otlp:
protocols:
grpc:
@@ -13,11 +19,9 @@ processors:
exporters:
logging:
logLevel: debug
- # OTLP for Tracetest
- otlp/tracetest:
- endpoint: tracetest:4317 # Send traces to Tracetest. Read more in docs here: https://docs.tracetest.io/configuration/connecting-to-data-stores/opentelemetry-collector
- tls:
- insecure: true
+
+ ${traceTestBlock}
+
# OTLP for Lightstep
otlp/lightstep:
endpoint: ingest.lightstep.com:443
@@ -36,7 +40,7 @@ service:
exporters: [logging, otlp/lightstep]
`;
-export const OtelCollector = `receivers:
+export const OtelCollector = (traceTestBlock: string) => `receivers:
otlp:
protocols:
grpc:
@@ -47,10 +51,7 @@ processors:
timeout: 100ms
exporters:
- otlp/1:
- endpoint: tracetest:4317
- tls:
- insecure: true
+ ${traceTestBlock}
service:
pipelines:
@@ -60,7 +61,7 @@ service:
exporters: [otlp/1]
`;
-export const NewRelic = `receivers:
+export const NewRelic = (traceTestBlock: string) => `receivers:
otlp:
protocols:
grpc:
@@ -73,11 +74,9 @@ processors:
exporters:
logging:
logLevel: debug
- # OTLP for Tracetest
- otlp/tracetest:
- endpoint: tracetest:4317 # Send traces to Tracetest. Read more in docs here: https://docs.tracetest.io/configuration/connecting-to-data-stores/opentelemetry-collector
- tls:
- insecure: true
+
+ ${traceTestBlock}
+
# OTLP for New Relic
otlp/newrelic:
endpoint: otlp.nr-data.net:443
@@ -98,7 +97,7 @@ service:
exporters: [logging, otlp/newrelic]
`;
-export const Datadog = `receivers:
+export const Datadog = (traceTestBlock: string) => `receivers:
otlp:
protocols:
http:
@@ -111,11 +110,8 @@ processors:
timeout: 10s
exporters:
- # OTLP for Tracetest
- otlp/tracetest:
- endpoint: tracetest:4317 # Send traces to Tracetest. Read more in docs here: https://docs.tracetest.io/configuration/connecting-to-data-stores/opentelemetry-collector
- tls:
- insecure: true
+ ${traceTestBlock}
+
# Datadog exporter
datadog:
api:
@@ -134,7 +130,7 @@ service:
exporters: [datadog]
`;
-export const Honeycomb = `receivers:
+export const Honeycomb = (traceTestBlock: string) => `receivers:
otlp:
protocols:
grpc:
@@ -147,11 +143,9 @@ processors:
exporters:
logging:
logLevel: debug
- # OTLP for Tracetest
- otlp/tracetest:
- endpoint: tracetest:4317 # Send traces to Tracetest. Read more in docs here: https://docs.tracetest.io/configuration/connecting-to-data-stores/opentelemetry-collector
- tls:
- insecure: true
+
+ ${traceTestBlock}
+
# OTLP for Honeycomb
otlp/honeycomb:
endpoint: "api.honeycomb.io:443"
@@ -171,7 +165,7 @@ service:
exporters: [logging, otlp/honeycomb]
`;
-export const AzureAppInsights = `receivers:
+export const AzureAppInsights = (traceTestBlock: string) => `receivers:
otlp:
protocols:
grpc:
@@ -183,10 +177,8 @@ processors:
exporters:
azuremonitor:
instrumentation_key:
- otlp/tracetest:
- endpoint: tracetest:4317
- tls:
- insecure: true
+
+ ${traceTestBlock}
service:
pipelines:
@@ -199,7 +191,7 @@ service:
exporters: [azuremonitor]
`;
-export const Signoz = `receivers:
+export const Signoz = (traceTestBlock: string) => `receivers:
otlp:
protocols:
grpc:
@@ -212,11 +204,9 @@ processors:
exporters:
logging:
logLevel: debug
- # OTLP for Tracetest
- otlp/tracetest:
- endpoint: tracetest:4317 # Send traces to Tracetest. Read more in docs here: https://docs.tracetest.io/configuration/connecting-to-data-stores/opentelemetry-collector
- tls:
- insecure: true
+
+ ${traceTestBlock}
+
# OTLP for Signoz
otlp/signoz:
endpoint: address-to-your-signoz-server:4317 # Send traces to Signoz. Read more in docs here: https://signoz.io/docs/tutorial/opentelemetry-binary-usage-in-virtual-machine/#opentelemetry-collector-configuration
@@ -235,7 +225,7 @@ service:
exporters: [logging, otlp/signoz]
`;
-export const Dynatrace = `receivers:
+export const Dynatrace = (traceTestBlock: string) => `receivers:
otlp:
protocols:
grpc:
@@ -247,12 +237,10 @@ processors:
exporters:
logging:
- verbosity: detailed
- # OTLP for Tracetest
- otlp/tracetest:
- endpoint: tracetest:4317 # Send traces to Tracetest. Read more in docs here: https://docs.tracetest.io/configuration/connecting-to-data-stores/opentelemetry-collector
- tls:
- insecure: true
+ verbosity: detailed
+
+ ${traceTestBlock}
+
# OTLP for Dynatrace
otlphttp/dynatrace:
endpoint: https://abc12345.live.dynatrace.com/api/v2/otlp # Send traces to Dynatrace. Read more in docs here: https://www.dynatrace.com/support/help/extend-dynatrace/opentelemetry/collector#configuration
@@ -272,6 +260,18 @@ service:
`;
export const CollectorConfigMap = {
+ [SupportedDataStores.Datadog]: Datadog(tracetest),
+ [SupportedDataStores.Lightstep]: Lightstep(tracetest),
+ [SupportedDataStores.NewRelic]: NewRelic(tracetest),
+ [SupportedDataStores.OtelCollector]: OtelCollector(tracetest),
+ [SupportedDataStores.Honeycomb]: Honeycomb(tracetest),
+ [SupportedDataStores.AzureAppInsights]: AzureAppInsights(tracetest),
+ [SupportedDataStores.Signoz]: Signoz(tracetest),
+ [SupportedDataStores.Dynatrace]: Dynatrace(tracetest),
+ [SupportedDataStores.Agent]: OtelCollector(tracetest),
+} as const;
+
+export const CollectorConfigFunctionMap = {
[SupportedDataStores.Datadog]: Datadog,
[SupportedDataStores.Lightstep]: Lightstep,
[SupportedDataStores.NewRelic]: NewRelic,
@@ -280,4 +280,5 @@ export const CollectorConfigMap = {
[SupportedDataStores.AzureAppInsights]: AzureAppInsights,
[SupportedDataStores.Signoz]: Signoz,
[SupportedDataStores.Dynatrace]: Dynatrace,
+ [SupportedDataStores.Agent]: OtelCollector,
} as const;
diff --git a/web/src/types/DataStore.types.ts b/web/src/types/DataStore.types.ts
index 7943dd2ed3..306ad297be 100644
--- a/web/src/types/DataStore.types.ts
+++ b/web/src/types/DataStore.types.ts
@@ -44,7 +44,8 @@ export type TCollectorDataStores =
| SupportedDataStores.Lightstep
| SupportedDataStores.Datadog
| SupportedDataStores.Signoz
- | SupportedDataStores.Dynatrace;
+ | SupportedDataStores.Dynatrace
+ | SupportedDataStores.Agent;
export type TRawGRPCClientSettings = TDataStoreSchemas['GRPCClientSettings'];
export type TRawElasticSearch = TDataStoreSchemas['ElasticSearch'];