Skip to content

EnvironmentGetter and EnvironmentSetter empty name normalization#8481

Open
pellared wants to merge 2 commits into
open-telemetry:mainfrom
pellared:empty-env
Open

EnvironmentGetter and EnvironmentSetter empty name normalization#8481
pellared wants to merge 2 commits into
open-telemetry:mainfrom
pellared:empty-env

Conversation

@pellared

Copy link
Copy Markdown
Member

@pellared pellared marked this pull request as ready for review June 18, 2026 20:25
@pellared

Copy link
Copy Markdown
Member Author

PTAL @jack-berg

@codecov

codecov Bot commented Jun 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.54%. Comparing base (a00536a) to head (d8b7ed8).

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #8481   +/-   ##
=========================================
  Coverage     78.54%   78.54%           
- Complexity     8473     8474    +1     
=========================================
  Files          1008     1008           
  Lines         28830    28832    +2     
  Branches       3570     3571    +1     
=========================================
+ Hits          22644    22646    +2     
  Misses         5341     5341           
  Partials        845      845           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jkwatson

Copy link
Copy Markdown
Contributor

I believe this still needs the above-mentioned spec PR to be merged before we can merge this.

@jkwatson jkwatson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just need to have the spec PR merged first, then good to go.

@pellared

pellared commented Jun 22, 2026

Copy link
Copy Markdown
Member Author

Just need to have the spec PR merged first, then good to go.

@jkwatson, @jack-berg, I unblocked this PR by merging the spec PR 😉

@pellared

pellared commented Jun 22, 2026

Copy link
Copy Markdown
Member Author

Side note: you can also read this conversation which is related to the keys method implementation: open-telemetry/opentelemetry-go-contrib#9112 (comment)

However, I do not want to address this in this PR 😅

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 <175728472+Copilot@users.noreply.github.com>
@pellared pellared requested a review from jkwatson June 22, 2026 14:32
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 this pull request may close these issues.

4 participants