open-telemetry / opentelemetry-specification

Specifications for OpenTelemetry
https://opentelemetry.io
Apache License 2.0
3.76k stars 890 forks source link

Support :? shell syntax for variable substitution #4190

Open yurishkuro opened 3 months ago

yurishkuro commented 3 months ago

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.

jack-berg commented 3 months ago

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.

danielgblanco commented 3 months ago

@jack-berg as you're part of the config SIG we (@jpkrohling and I) are assuming you're the sponsor. Thanks.