diff --git a/CHANGELOG.md b/CHANGELOG.md index 7079975e3d..1df51ee2e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/packages/opentelemetry-core/src/platform/node/environment.ts b/packages/opentelemetry-core/src/platform/node/environment.ts index 749633f08b..48658693fe 100644 --- a/packages/opentelemetry-core/src/platform/node/environment.ts +++ b/packages/opentelemetry-core/src/platform/node/environment.ts @@ -14,7 +14,6 @@ * limitations under the License. */ -import * as os from 'os'; import { DEFAULT_ENVIRONMENT, ENVIRONMENT, @@ -27,11 +26,5 @@ import { */ export function getEnv(): Required { const processEnv = parseEnvironment(process.env as RAW_ENVIRONMENT); - return Object.assign( - { - HOSTNAME: os.hostname(), - }, - DEFAULT_ENVIRONMENT, - processEnv - ); + return Object.assign({}, DEFAULT_ENVIRONMENT, processEnv); }