open-telemetry / opentelemetry-collector

OpenTelemetry Collector

Home Page:https://opentelemetry.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Document `$$` mechanism to escape env var expansion

dyladan opened this issue · comments

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.

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

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