diff --git a/internal/pkg/config/config.go b/internal/pkg/config/config.go index ed0bdfc30e0..b57a36eca88 100644 --- a/internal/pkg/config/config.go +++ b/internal/pkg/config/config.go @@ -51,7 +51,7 @@ var DefaultOptions = []interface{}{ ucfg.VarExp, VarSkipKeys("inputs"), ucfg.IgnoreCommas, - OTelKeys("receivers", "processors", "exporters", "extensions", "service"), + OTelKeys("connectors", "receivers", "processors", "exporters", "extensions", "service"), } // Config custom type that can provide both an Agent configuration alongside of an optional OTel configuration. diff --git a/internal/pkg/config/config_test.go b/internal/pkg/config/config_test.go index f55df70f028..55f5d60e7c8 100644 --- a/internal/pkg/config/config_test.go +++ b/internal/pkg/config/config_test.go @@ -223,6 +223,9 @@ func TestConfigOTelNotNil(t *testing.T) { }, }, }, + "connectors": map[string]interface{}{ + "count": map[string]interface{}{}, + }, "receivers": map[string]interface{}{ "otlp": map[string]interface{}{ "protocols": map[string]interface{}{ @@ -269,6 +272,7 @@ func TestConfigOTelNotNil(t *testing.T) { require.NotNil(t, c.Agent) require.NotNil(t, c.OTel) + assert.NotNil(t, c.OTel.Get("connectors")) assert.NotNil(t, c.OTel.Get("receivers")) assert.NotNil(t, c.OTel.Get("processors")) assert.NotNil(t, c.OTel.Get("exporters"))