Skip to content

Commit c212a8e

Browse files
committed
Add connectors to OTelKeys.
1 parent 39adecf commit c212a8e

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

internal/pkg/config/config.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ var DefaultOptions = []interface{}{
5151
ucfg.VarExp,
5252
VarSkipKeys("inputs"),
5353
ucfg.IgnoreCommas,
54-
OTelKeys("receivers", "processors", "exporters", "extensions", "service"),
54+
OTelKeys("connectors", "receivers", "processors", "exporters", "extensions", "service"),
5555
}
5656

5757
// Config custom type that can provide both an Agent configuration alongside of an optional OTel configuration.

internal/pkg/config/config_test.go

+4
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,9 @@ func TestConfigOTelNotNil(t *testing.T) {
223223
},
224224
},
225225
},
226+
"connectors": map[string]interface{}{
227+
"count": map[string]interface{}{},
228+
},
226229
"receivers": map[string]interface{}{
227230
"otlp": map[string]interface{}{
228231
"protocols": map[string]interface{}{
@@ -269,6 +272,7 @@ func TestConfigOTelNotNil(t *testing.T) {
269272
require.NotNil(t, c.Agent)
270273

271274
require.NotNil(t, c.OTel)
275+
assert.NotNil(t, c.OTel.Get("connectors"))
272276
assert.NotNil(t, c.OTel.Get("receivers"))
273277
assert.NotNil(t, c.OTel.Get("processors"))
274278
assert.NotNil(t, c.OTel.Get("exporters"))

0 commit comments

Comments
 (0)