From 78d1718428a06456987cccf473e75622a07a4fda Mon Sep 17 00:00:00 2001 From: Evan Bradley <11745660+evan-bradley@users.noreply.github.com> Date: Mon, 8 Apr 2024 04:48:57 -0400 Subject: [PATCH] [chore] Add nop components to otelcontribcol (#32203) **Description:** Add the nop receiver and nop exporter to otelcontribcol. **Link to tracking Issue:** https://github.com/open-telemetry/opentelemetry-collector/issues/7316 --- cmd/otelcontribcol/builder-config.yaml | 2 ++ cmd/otelcontribcol/components.go | 4 ++++ cmd/otelcontribcol/go.mod | 2 ++ cmd/otelcontribcol/go.sum | 4 ++++ 4 files changed, 12 insertions(+) diff --git a/cmd/otelcontribcol/builder-config.yaml b/cmd/otelcontribcol/builder-config.yaml index fd50c219a473..ec05c45aaf87 100644 --- a/cmd/otelcontribcol/builder-config.yaml +++ b/cmd/otelcontribcol/builder-config.yaml @@ -44,6 +44,7 @@ extensions: exporters: - gomod: go.opentelemetry.io/collector/exporter/debugexporter v0.97.1-0.20240404121116-4f1a8936d26b + - gomod: go.opentelemetry.io/collector/exporter/nopexporter v0.97.1-0.20240404121116-4f1a8936d26b - gomod: go.opentelemetry.io/collector/exporter/otlpexporter v0.97.1-0.20240404121116-4f1a8936d26b - gomod: go.opentelemetry.io/collector/exporter/otlphttpexporter v0.97.1-0.20240404121116-4f1a8936d26b - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alertmanagerexporter v0.97.0 @@ -116,6 +117,7 @@ processors: - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/remotetapprocessor v0.97.0 receivers: + - gomod: go.opentelemetry.io/collector/receiver/nopreceiver v0.97.1-0.20240404121116-4f1a8936d26b - gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.97.1-0.20240404121116-4f1a8936d26b - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/activedirectorydsreceiver v0.97.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/aerospikereceiver v0.97.0 diff --git a/cmd/otelcontribcol/components.go b/cmd/otelcontribcol/components.go index 53f8be8576c4..62cb58b6d5a4 100644 --- a/cmd/otelcontribcol/components.go +++ b/cmd/otelcontribcol/components.go @@ -7,6 +7,7 @@ import ( forwardconnector "go.opentelemetry.io/collector/connector/forwardconnector" "go.opentelemetry.io/collector/exporter" debugexporter "go.opentelemetry.io/collector/exporter/debugexporter" + nopexporter "go.opentelemetry.io/collector/exporter/nopexporter" otlpexporter "go.opentelemetry.io/collector/exporter/otlpexporter" otlphttpexporter "go.opentelemetry.io/collector/exporter/otlphttpexporter" "go.opentelemetry.io/collector/extension" @@ -17,6 +18,7 @@ import ( batchprocessor "go.opentelemetry.io/collector/processor/batchprocessor" memorylimiterprocessor "go.opentelemetry.io/collector/processor/memorylimiterprocessor" "go.opentelemetry.io/collector/receiver" + nopreceiver "go.opentelemetry.io/collector/receiver/nopreceiver" otlpreceiver "go.opentelemetry.io/collector/receiver/otlpreceiver" countconnector "github.com/open-telemetry/opentelemetry-collector-contrib/connector/countconnector" @@ -247,6 +249,7 @@ func components() (otelcol.Factories, error) { } factories.Receivers, err = receiver.MakeFactoryMap( + nopreceiver.NewFactory(), otlpreceiver.NewFactory(), activedirectorydsreceiver.NewFactory(), aerospikereceiver.NewFactory(), @@ -341,6 +344,7 @@ func components() (otelcol.Factories, error) { factories.Exporters, err = exporter.MakeFactoryMap( debugexporter.NewFactory(), + nopexporter.NewFactory(), otlpexporter.NewFactory(), otlphttpexporter.NewFactory(), alertmanagerexporter.NewFactory(), diff --git a/cmd/otelcontribcol/go.mod b/cmd/otelcontribcol/go.mod index 7f4646458126..c54b24895882 100644 --- a/cmd/otelcontribcol/go.mod +++ b/cmd/otelcontribcol/go.mod @@ -205,6 +205,7 @@ require ( go.opentelemetry.io/collector/consumer v0.97.1-0.20240404121116-4f1a8936d26b go.opentelemetry.io/collector/exporter v0.97.1-0.20240404121116-4f1a8936d26b go.opentelemetry.io/collector/exporter/debugexporter v0.97.1-0.20240404121116-4f1a8936d26b + go.opentelemetry.io/collector/exporter/nopexporter v0.97.1-0.20240404121116-4f1a8936d26b go.opentelemetry.io/collector/exporter/otlpexporter v0.97.1-0.20240404121116-4f1a8936d26b go.opentelemetry.io/collector/exporter/otlphttpexporter v0.97.1-0.20240404121116-4f1a8936d26b go.opentelemetry.io/collector/extension v0.97.1-0.20240404121116-4f1a8936d26b @@ -216,6 +217,7 @@ require ( go.opentelemetry.io/collector/processor/batchprocessor v0.97.1-0.20240404121116-4f1a8936d26b go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.97.1-0.20240404121116-4f1a8936d26b go.opentelemetry.io/collector/receiver v0.97.1-0.20240404121116-4f1a8936d26b + go.opentelemetry.io/collector/receiver/nopreceiver v0.97.1-0.20240404121116-4f1a8936d26b go.opentelemetry.io/collector/receiver/otlpreceiver v0.97.1-0.20240404121116-4f1a8936d26b golang.org/x/sys v0.18.0 ) diff --git a/cmd/otelcontribcol/go.sum b/cmd/otelcontribcol/go.sum index 04e3cb213ef7..67f76ccdddf0 100644 --- a/cmd/otelcontribcol/go.sum +++ b/cmd/otelcontribcol/go.sum @@ -1700,6 +1700,8 @@ go.opentelemetry.io/collector/exporter v0.97.1-0.20240404121116-4f1a8936d26b h1: go.opentelemetry.io/collector/exporter v0.97.1-0.20240404121116-4f1a8936d26b/go.mod h1:Oq6SCLx9tQch5zeleIkhUw/e2g16+yQkyztCHsAHKNU= go.opentelemetry.io/collector/exporter/debugexporter v0.97.1-0.20240404121116-4f1a8936d26b h1:peaYUYJQuzSDBH0bbjDaFxep/qut+VY8eSa28OPOjsE= go.opentelemetry.io/collector/exporter/debugexporter v0.97.1-0.20240404121116-4f1a8936d26b/go.mod h1:bD14O9UdbCLRMllSqObkA1klraPHe0GWmw4QUBxNH2g= +go.opentelemetry.io/collector/exporter/nopexporter v0.97.1-0.20240404121116-4f1a8936d26b h1:rZh/w8ojf9blIcWEhE0UHTVAEsJTLtrHJpWcNO9Nm6M= +go.opentelemetry.io/collector/exporter/nopexporter v0.97.1-0.20240404121116-4f1a8936d26b/go.mod h1:qtQNvmDdzQZU2iPiVxcip8wnL1W13qIQSZ4wJeGR/3I= go.opentelemetry.io/collector/exporter/otlpexporter v0.97.1-0.20240404121116-4f1a8936d26b h1:jv6wp8Muswbz/iS62KGDNUZx2GSBsnL9zL2RAQDQTxw= go.opentelemetry.io/collector/exporter/otlpexporter v0.97.1-0.20240404121116-4f1a8936d26b/go.mod h1:d0SAS68CUbHU+GKOrzMlGMWCsRfn8a9Rh8AUOHxC+xk= go.opentelemetry.io/collector/exporter/otlphttpexporter v0.97.1-0.20240404121116-4f1a8936d26b h1:rkbtSTjRgfd9eR/UdSMJJr4QtMoRLGqD3AvLffcqIZg= @@ -1726,6 +1728,8 @@ go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.97.1-0.2024040 go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.97.1-0.20240404121116-4f1a8936d26b/go.mod h1:JVGUkc1eFmFDBGqr94dl+dqF2FFPe7LeBeWGvJiFWmM= go.opentelemetry.io/collector/receiver v0.97.1-0.20240404121116-4f1a8936d26b h1:d9xejxpSk5O46aM1X5nUb1qGQl1ToGQJy39csqnYl7c= go.opentelemetry.io/collector/receiver v0.97.1-0.20240404121116-4f1a8936d26b/go.mod h1:oj/eoc8Wf9u82gaPeRVdHmFbJ5e3m5F1v5CFTpjiVFU= +go.opentelemetry.io/collector/receiver/nopreceiver v0.97.1-0.20240404121116-4f1a8936d26b h1:TUyh1x/8AOYlvVT+XdEaYgXFy6o0HblIpZI4DMqUoCU= +go.opentelemetry.io/collector/receiver/nopreceiver v0.97.1-0.20240404121116-4f1a8936d26b/go.mod h1:9jA/NNzLD6vSc7DnvjSROsyXahyAP+KvBv00NfXDvus= go.opentelemetry.io/collector/receiver/otlpreceiver v0.97.1-0.20240404121116-4f1a8936d26b h1:2BGhGCTz/u8belzwCsUyvrCUd6LOq86Imhjs9KFLSIQ= go.opentelemetry.io/collector/receiver/otlpreceiver v0.97.1-0.20240404121116-4f1a8936d26b/go.mod h1:7iMRy+V3iGQS7Jg9YyN1SzIcE3QwNOF4hD32M6SgZ9s= go.opentelemetry.io/collector/semconv v0.97.1-0.20240404121116-4f1a8936d26b h1:2ApIgbCJPzABy6TDKlc9b55J/zo6ixAIMPvIUC2nB9U=