From eba6c7611598d399da5723f762d240d61146671a Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Wed, 20 Dec 2023 16:12:46 -0800 Subject: [PATCH] WIP --- otelcol/config.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/otelcol/config.go b/otelcol/config.go index 9345405b4fd..0d03f7f8bb5 100644 --- a/otelcol/config.go +++ b/otelcol/config.go @@ -146,6 +146,18 @@ func (cfg *Config) Validate() error { } return fmt.Errorf("service::pipelines::%s: references exporter %q which is not configured", pipelineID, ref) } + + // Validate that pipelines contain valid components for the type + // of pipeline. + switch pipelineID.Type() { + case component.DataTypeTraces: + for _, ref := range pipeline.Receivers { + receiver := cfg.Receivers[ref] + // TODO: somehow get receiver to return component.ErrDataTypeIsNotSupported + } + case component.DataTypeMetrics: + case component.DataTypeLogs: + } } return nil }