-
Notifications
You must be signed in to change notification settings - Fork 888
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
Support for ${env:ENV}
syntax
#3961
Comments
For context, here's the discussion on this topic from when env var substitution was initially added. We discussed in the 11/21/23 spec sig. Meeting notes entires on the subject:
So the pushback was about not wanting to burden implementations with the complexity of having to implement other env vars substitution sources besides env vars, and to have a syntax for familiar to bash users. I think that alignment with the collector syntax is a good reason to accept the |
cc @open-telemetry/configuration-maintainers |
…bstitution (#3974) Fixes #3961 ## Changes Allows for the usage of the `${env:ENV}` syntax in SDK file configuration. This syntax is used in the OpenTelemetry Collector, see https://opentelemetry.io/docs/collector/configuration/#environment-variables for more information. This does not mean that other providers need to be supported; if we want to allow this we would need to reserve that syntax by rejecting `${<provider>:URI}` as invalid, since right now it would be left as-is. * [x] Related issues #3961, part of #3963 --------- Co-authored-by: jack-berg <[email protected]>
…bstitution (open-telemetry#3974) Fixes open-telemetry#3961 ## Changes Allows for the usage of the `${env:ENV}` syntax in SDK file configuration. This syntax is used in the OpenTelemetry Collector, see https://opentelemetry.io/docs/collector/configuration/#environment-variables for more information. This does not mean that other providers need to be supported; if we want to allow this we would need to reserve that syntax by rejecting `${<provider>:URI}` as invalid, since right now it would be left as-is. * [x] Related issues open-telemetry#3961, part of open-telemetry#3963 --------- Co-authored-by: jack-berg <[email protected]>
The Collector supports
${env:ENV}
style syntax in addition to${ENV}
and$ENV
. It would be desirable that the Collector and the SDK configuration files support the same syntax.The Collector SIG has previously discussed dropping the
$ENV
syntax, and there seems to be consensus for it. While this needs to be explicitly discussed, I think we are willing to support${ENV}
as a shorthand for${env:ENV}
.To align the two configuration formats, I would like to ask the Configuration WG to do one of the following:
${env:ENV}
syntax as equivalent to${ENV}
OR${env:ENV}
syntax is present in a configuration fileSince the environment variable names accepted by the current specification are ASCII alphanumerics +
_
, there is no ambiguity with the${env:ENV}
syntax. However, we need to make a decision now on this (while experimental), since resolution would work differently.The text was updated successfully, but these errors were encountered: