Skip to content

Commit

Permalink
Add connectors to OTelKeys.
Browse files Browse the repository at this point in the history
  • Loading branch information
blakerouse committed Nov 18, 2024
1 parent 39adecf commit c212a8e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion internal/pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 4 additions & 0 deletions internal/pkg/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{}{
Expand Down Expand Up @@ -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"))
Expand Down

0 comments on commit c212a8e

Please sign in to comment.