Skip to content

Commit

Permalink
refactor(core): drop unnecessary assignment of HOSTNAME (#4421)
Browse files Browse the repository at this point in the history
* fix(core): drop unnecessary assignemnt of HOSTNAME

* fix(changelog): add changelog entry

* Update CHANGELOG.md

* fix(changelog): move entry to internal
  • Loading branch information
pichlermarc authored Jan 18, 2024
1 parent bf8714e commit 2a3c264
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ For experimental package changes, see the [experimental CHANGELOG](experimental/
### :house: (Internal)

* chore(opentelemetry-context-zone-peer-dep): support zone.js ^v0.13.0 [#4320](https://github.com/open-telemetry/opentelemetry-js/pull/4320)
* refactor(core): drop unnecessary assignment of HOSTNAME [#4421](https://github.com/open-telemetry/opentelemetry-js/pull/4421) @pichlermarc

## 1.20.0

Expand Down
9 changes: 1 addition & 8 deletions packages/opentelemetry-core/src/platform/node/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* limitations under the License.
*/

import * as os from 'os';
import {
DEFAULT_ENVIRONMENT,
ENVIRONMENT,
Expand All @@ -27,11 +26,5 @@ import {
*/
export function getEnv(): Required<ENVIRONMENT> {
const processEnv = parseEnvironment(process.env as RAW_ENVIRONMENT);
return Object.assign(
{
HOSTNAME: os.hostname(),
},
DEFAULT_ENVIRONMENT,
processEnv
);
return Object.assign({}, DEFAULT_ENVIRONMENT, processEnv);
}

0 comments on commit 2a3c264

Please sign in to comment.