open-telemetry / opentelemetry-collector

OpenTelemetry Collector
https://opentelemetry.io
Apache License 2.0
3.94k stars 1.32k forks source link

[confignet] Should `TransportType` unmarshal be case insensitive? #10032

Open TylerHelmuth opened 3 weeks ago

TylerHelmuth commented 3 weeks ago

Is your feature request related to a problem? Please describe. Came across a situation in Contrib where the TransportType could not be used because the exporter supported tcp or TCP, but the TransportType unmarshal expects lowercase only.

https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/32379#discussion_r1575801010

Describe the solution you'd like Should we consider treating the strings we're unmarshalling as case insensitive?

mx-psi commented 3 weeks ago

We can do this after 1.0, right? As long as the error message is clear, I don't think there is a need to do this right now

TylerHelmuth commented 2 weeks ago

I think it could wait until after 1.0 according to our version controls:

Relaxing validation rules. An invalid configuration struct as defined by its Validate method return value may become valid after a change to the validation rules.

mx-psi commented 2 weeks ago

Oki, I am going to remove from the 1.0 milestone then (we can still do it now, just want to make it clear this is not a blocker for 1.0)