Skip to content

Log a warning when an environment variable without a value is expanded #5615

@dyladan

Description

@dyladan

Related to #5614

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. There was nothing logged in the collector to alert this user that their configuration was being mangled by the failed environment expansion.

Describe the solution you'd like

When an environment variable expansion has no value, log a warning.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions