Skip to content

Conversation

@pichlermarc
Copy link
Member

Which problem is this PR solving?

We're planning to remove getEnv() as it does not scale well when everyone has to update @opentelemetry/core to get their env vars. For OTEL_* there will be a replacement utility function. For all others, when the package does not need to be browser-compatible (which seems to be the case here) using process.env directly should be fine.

Refs open-telemetry/opentelemetry-js#5443

Short description of the changes

This PR removes getEnv() with process.env, it does not inline defaults as leaving them out was semantically equivalent. (they used to be empty strings)

@codecov
Copy link

codecov bot commented Feb 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.40%. Comparing base (7a1e8b3) to head (639f720).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2706   +/-   ##
=======================================
  Coverage   92.40%   92.40%           
=======================================
  Files         171      171           
  Lines        8142     8142           
  Branches     1647     1649    +2     
=======================================
  Hits         7524     7524           
  Misses        618      618           
Files with missing lines Coverage Δ
...e-detector-aws/src/detectors/AwsEcsDetectorSync.ts 97.08% <100.00%> (ø)

@pichlermarc pichlermarc merged commit db8245a into open-telemetry:main Feb 12, 2025
25 checks passed
@pichlermarc pichlermarc deleted the chore/aws-stop-using-getenv branch February 12, 2025 09:06
deejay1 pushed a commit to deejay1/opentelemetry-js-contrib that referenced this pull request Apr 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants