opentelemetry-specification
opentelemetry-specification copied to clipboard
Support :? shell syntax for variable substitution
What are you trying to achieve?
Config WG merged a proposal (#3744, #3974, #3948) to support env var expansion syntax with defaults, using the traditional shell syntax VARNAME:-default. But shell syntax also commonly includes VARNAME:?error message syntax for undefined variables which was omitted. This omission is an unexpected behavior to users who are used to shell syntax.
Additional context.
- https://github.com/open-telemetry/opentelemetry-specification/pull/4128#discussion_r1722198163
- https://github.com/open-telemetry/opentelemetry-collector/pull/10907/files#r1722093779
Agree that the behavior is unexpected.
Clarification on the history: Env var substitution syntax was added in #3744, extended to support ${env:ENV_VAR} in #3974, extended to support default syntax ${ENVVAR:-defaultValue} in #3948.
@jack-berg as you're part of the config SIG we (@jpkrohling and I) are assuming you're the sponsor. Thanks.