Loosely defined behavior when parsing unset environment variables #3864
Labels
area:configuration
Related to configuring the SDK
area:sdk
Related to the SDK
[label deprecated] triaged-needmoreinfo
[label deprecated] The issue is triaged - the OTel community needs more information to decide
spec:miscellaneous
For issues that don't match any other spec label
spec:resource
Related to the specification/resource directory
The Parsing empty value SDK env variables specification, says that env variables with empty values should be interpreted the same way as unset:
But I couldn't find any similar specification defining the behavior for interpreting unset env variables.
Additional context.
The question came up when adding the env resource detector to Envoy proxy. Initially, the detector was throwing an exception when the variable was unset/empty (which the Envoy community initially thought that was the best way forward). Now revisiting this decision, we want to prevent the detector throwing errors, as it impacts things like service meshes (e.g., Istio)
Then, a question in the PR came: if the env variable is set, but empty it should still throw an error. Then pointing to the spec section above makes it unclear what it should be done, since there's no definition for unset.
What did you expect to see?
It seems all SDKs I looked, don't throw errors when the env variable is unset, which makes sense. Then this makes unset/empty the same thing. IMO this should be also written to the spec to avoid any confusion.
The text was updated successfully, but these errors were encountered: