Open
Description
Is your feature request related to a problem? Please describe.
I expected the configuration validator to find pipeline issues related to invalid usage of connector components, however the collector fails to start due to invalid usage and exits.
Here is an example that defines a count
connector and uses it as a receiver in a metrics pipeline:
---
receivers:
otlp:
protocols:
grpc:
http:
exporters:
logging:
connectors:
count:
service:
pipelines:
traces/in:
receivers: [otlp]
exporters: [logging]
metrics/out:
receivers: [count]
exporters: [logging]
The config.yaml passes validation:
otel-validations(:|β) %
π€ docker run -v $(pwd)/config.yaml:/etc/otelcol-contrib/config.yaml ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:0.87.0 validate --config=/etc/otelcol-contrib/config.yaml
otel-validations(:|β) %
π€ echo $?
0
However upon using this configuration, the collector reports an error and exits:
otel-validations(:|β) %
π€ docker run -v $(pwd)/config.yaml:/etc/otelcol-contrib/config.yaml ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:0.87.0
2023-10-22T21:05:36.612Z info service@v0.87.0/telemetry.go:84 Setting up own telemetry...
2023-10-22T21:05:36.612Z info service@v0.87.0/telemetry.go:201 Serving Prometheus metrics {"address": ":8888", "level": "Basic"}
Error: failed to build pipelines: connector "count" used as receiver in metrics pipeline but not used in any supported exporter pipeline
2023/10/22 21:05:36 collector server run finished with error: failed to build pipelines: connector "count" used as receiver in metrics pipeline but not used in any supported exporter pipeline
otel-validations(:|β) %
π€ echo $?
1
Β
Describe the solution you'd like
I expect the validator to return an error