Description
Describe the bug
Since OpenTelemetry Collector v0.106.0, receivers based on HTTP using authentication (via auth.authenticators
) are failing to parse their configuration with this error message:
decoding failed due to the following error(s):
error decoding '': decoding failed due to the following error(s):
'protocols.http.auth' has invalid keys: authenticator
Steps to reproduce
This is a small diff on top of v0.106.0 and we see the same issue in a custom component of ours which is using confighttp.ServerConfig
(go.opentelemetry.io/collector/config/confighttp
).
OpenTelemetry Collector v0.105.0 is working fine.
diff --git receiver/otlpreceiver/testdata/config.yaml receiver/otlpreceiver/testdata/config.yaml
index 018f8d664..258893416 100644
--- receiver/otlpreceiver/testdata/config.yaml
+++ receiver/otlpreceiver/testdata/config.yaml
@@ -26,6 +26,8 @@ protocols:
min_time: 10s
permit_without_stream: true
http:
+ auth:
+ authenticator: nop
# The following entry demonstrates how to specify TLS credentials for the server.
# Note: These files do not exist. If the receiver is started with this configuration, it will fail.
tls:
What did you expect to see?
The tests in receiver/otlpreceiver
should be successful.
What did you see instead?
❯ make test
go test -race -timeout 240s ./...
? go.opentelemetry.io/collector/receiver/otlpreceiver/internal/metadata [no test files]
--- FAIL: TestUnmarshalConfig (0.01s)
config_test.go:85:
Error Trace: /Users/joschi/src/opentelemetry-collector/receiver/otlpreceiver/config_test.go:85
Error: Received unexpected error:
decoding failed due to the following error(s):
error decoding '': decoding failed due to the following error(s):
'protocols.http.auth' has invalid keys: authenticator
Test: TestUnmarshalConfig
config_test.go:86:
[...]
FAIL
FAIL go.opentelemetry.io/collector/receiver/otlpreceiver 2.235s
ok go.opentelemetry.io/collector/receiver/otlpreceiver/internal/errors (cached)
ok go.opentelemetry.io/collector/receiver/otlpreceiver/internal/logs (cached)
ok go.opentelemetry.io/collector/receiver/otlpreceiver/internal/metrics (cached)
ok go.opentelemetry.io/collector/receiver/otlpreceiver/internal/trace (cached)
FAIL
make: *** [test] Error 1
What version did you use?
https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.106.0
Additional context
From the release notes of OpenTelemetry Collector v0.106.0 it looks like this change could be causing the issue: