Skip to content

[file configuration] Escaping environment variable substitution #3914

Description

@pellared

What are you trying to achieve?

Reference: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/file-configuration.md#environment-variable-substitution

I would like to set a string value to ${NOT_ENV_VAR} and make sure it is not escaped.

Additional context.

I think that the user should take advantage of https://yaml.org/spec/1.2.2/#57-escaped-characters and do it e.g. like this:

key: "$\x7bNOT_ENV_VAR\x7d"

See: https://yaml-online-parser.appspot.com/?yaml=key%3A+%22%24%5Cx7bNOT_ENV_VAR%5Cx7d%22%0A&type=json

Even if this looks obvious, I would prefer to have it documented as the specification may also help in validating the implementation (and help in writing unit tests).

CC @jack-berg

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:configurationRelated to configuring the SDKsig-issueA specific SIG should look into this before discussing at the specspec:miscellaneousFor issues that don't match any other spec labeltriage:accepted:readyReady to be implemented. Small enough or uncontroversial enough to be implemented without sponsor

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions