Skip to content
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

Document $$ mechanism to escape env var expansion #5614

Closed
dyladan opened this issue Jul 1, 2022 · 2 comments · Fixed by open-telemetry/opentelemetry.io#1527
Closed

Document $$ mechanism to escape env var expansion #5614

dyladan opened this issue Jul 1, 2022 · 2 comments · Fixed by open-telemetry/opentelemetry.io#1527

Comments

@dyladan
Copy link
Member

dyladan commented Jul 1, 2022

Is your feature request related to a problem? Please describe.

In open-telemetry/opentelemetry-collector-contrib#11846 the user was trying to use "$ConnectionString" as a Username. The collector automatically interprets $ as an environment variable expansion. The environment variable was empty, so the Username field was interpreted as empty and failed validation. In

// Escaping the prefix so $$ becomes a single $ without attempting
there is a codepath to escape this behavior using $$, but it is undocumented.

Describe the solution you'd like

Document the $$ environment variable escaping.

@evan-bradley
Copy link
Contributor

I'll update the docs to include a note about this behavior.

evan-bradley added a commit to evan-bradley/opentelemetry.io that referenced this issue Jul 6, 2022
Document escaping `$` using `$$` and demonstrate that curly braces are
optional for environment variables.

Resolves open-telemetry/opentelemetry-collector#5614
@evan-bradley
Copy link
Contributor

The behavior has been documented, this issue can be closed.

@mx-psi mx-psi closed this as completed Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants