-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Collector supports case insensitive configuration but it is not properly handled across the codebase. #7002
Comments
Carbon receiver already got the fix for the typo https://github.com/open-telemetry/opentelemetry-collector-contrib/blame/main/receiver/carbonreceiver/protocol/regex_parser.go#L78 which means that collector-contrib v0.70 will have this fix. after this point it is safe to change the collector validation logic to be case sensitive. |
…ions (open-telemetry#6876)" (open-telemetry#6988)" This reverts commit 80cabdd. Closes open-telemetry#7002
Thanks. I'll create the pull request, for when we're ready. Hope that's ok. |
The issue is correct, but there is another bug that makes it correct. If this comment is true https://github.com/open-telemetry/opentelemetry-collector/blob/main/confmap/confmap.go#L119 then this issue is not an issue, since the checks will be case-insensitive as well, but that comment is not true - Need a fix for this as well. |
Describe the bug
The collector supports case insensitive configuration, allowing typos in the configuration to change the behavior of the code. This can happen in the code because in several instances we are not relaying on the de-serialized datastructure, but checking the existing of keys in the code.
E.g.:
opentelemetry-collector/exporter/loggingexporter/config.go
Line 75 in 2b96397
There was a fix for this issue but this was reverted.
Steps to reproduce
Create a configuration with a typo, replacing a lower case by an uppercase in the logging exporter loglevel -> logLevel.
What did you expect to see?
loglevel to be properly set or an error message that the configuration is invalid.
What did you see instead?
loglevel set incorrectly.
What version did you use?
v0.69.1
Environment
Centos 7
The text was updated successfully, but these errors were encountered: