Skip to content

Commit

Permalink
refactor(core): drop unnecessary assignment of HOSTNAME (open-telemet…
Browse files Browse the repository at this point in the history
…ry#4421)

* 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 and Zirak committed Sep 14, 2024
1 parent 5f7acf2 commit 612c522
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 612c522

Please sign in to comment.