Skip to content

opentelemetry-api: normalize empty environment propagation names to "_" in EnvironmentSetter and EnvironmentGetter#5328

Merged
lzchen merged 2 commits into
open-telemetry:mainfrom
pellared:empty-env-var
Jun 19, 2026
Merged

opentelemetry-api: normalize empty environment propagation names to "_" in EnvironmentSetter and EnvironmentGetter#5328
lzchen merged 2 commits into
open-telemetry:mainfrom
pellared:empty-env-var

Conversation

@pellared

Copy link
Copy Markdown
Member

@github-project-automation github-project-automation Bot moved this to Approved PRs in Python PR digest Jun 19, 2026
@xrmx xrmx moved this from Approved PRs to Easy to review / merge / close in Python PR digest Jun 19, 2026
@github-project-automation github-project-automation Bot moved this from Easy to review / merge / close to Approved PRs in Python PR digest Jun 19, 2026
@lzchen
lzchen added this pull request to the merge queue Jun 19, 2026
Merged via the queue into open-telemetry:main with commit 13ad4d5 Jun 19, 2026
520 checks passed
@github-project-automation github-project-automation Bot moved this from Approved PRs to Done in Python PR digest Jun 19, 2026
@pellared
pellared deleted the empty-env-var branch June 19, 2026 19:03
pellared added a commit to pellared/opentelemetry-specification that referenced this pull request Jun 22, 2026
…try#5163)

Issue discovered by @MrAlias in
open-telemetry/opentelemetry-go-contrib#9112 (comment)

Also see
open-telemetry#5163 (comment)

Prototypes: 
-
open-telemetry/opentelemetry-go-contrib@0fedf62
- open-telemetry/opentelemetry-dotnet#7424
- open-telemetry/opentelemetry-swift-core#86
- open-telemetry/opentelemetry-python#5328
- open-telemetry/opentelemetry-js#6827
- open-telemetry/opentelemetry-java#8481

For values to be fully portable across POSIX-compliant systems and shell
utilities, the standard dictates that environment variable names must
consist solely of uppercase letters, digits, and underscores (_), and
must not begin with a digit. While some individual implementations might
tolerate unusual characters, an empty string lacks any valid characters
entirely and cannot act as a recognizable identifier.

I verified that on Ubuntu it is not possible to set a env var with an
empty name.

---------

Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants