HOSTNAME
is blank when not present in environment
#4405
Labels
bug
Something isn't working
pkg:core
priority:p4
Bugs and spec inconsistencies which do not fall into a higher prioritization
What happened?
Steps to Reproduce
Ensure
HOSTNAME
is not present onprocess.env
Expected Result
HOSTNAME
falls back toos.hostname()
Actual Result
HOSTNAME
is blankAdditional Details
It looks like the intention is to use
os.hostname()
as the default forHOSTNAME
ingetEnv()
, but then it’s getting replaced by the default values fromDEFAULT_ENVIRONMENT
. I think the order of{ HOSTNAME: os.hostname(), }
andDEFAULT_ENVIRONMENT
could be swapped.opentelemetry-js/packages/opentelemetry-core/src/platform/node/environment.ts
Lines 30 to 36 in ae0a3c5
OpenTelemetry Setup Code
No response
package.json
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: