Host

Status: Experimental

type: host

Description: A host is defined as a general computing instance.

AttributeTypeDescriptionExamplesRequirement Level
host.idstringUnique host ID. For Cloud, this must be the instance_id assigned by the cloud provider. For non-containerized systems, this should be the machine-id. See the table below for the sources to use to determine the machine-id based on operating system.fdbf79e8af94cb7f9e8df36789187052Recommended
host.namestringName of the host. On Unix systems, it may contain what the hostname command returns, or the fully qualified hostname, or another name specified by the user.opentelemetry-testRecommended
host.typestringType of host. For Cloud, this must be the machine type.n1-standard-1Recommended
host.archstringThe CPU architecture the host system is running on.amd64Recommended
host.image.namestringName of the VM image or OS install the host was instantiated from.infra-ami-eks-worker-node-7d4ec78312; CentOS-8-x86_64-1905Recommended
host.image.idstringVM image ID. For Cloud, this value is from the provider.ami-07b06b442921831e5Recommended
host.image.versionstringThe version string of the VM image as defined in Version Attributes.0.1Recommended

host.arch has the following list of well-known values. If one of them applies, then the respective value MUST be used, otherwise a custom value MAY be used.

ValueDescription
amd64AMD64
arm32ARM32
arm64ARM64
ia64Itanium
ppc3232-bit PowerPC
ppc6464-bit PowerPC
s390xIBM z/Architecture
x8632-bit x86

Collecting host.id from non-containerized systems

Non-privileged Machine ID Lookup

When collecting host.id for non-containerized systems non-privileged lookups of the machine id are preferred. SDK detector implementations MUST use the sources listed below to obtain the machine id.

OSPrimaryFallback
Linuxcontents of /etc/machine-idcontents of /var/lib/dbus/machine-id
BSDcontents of /etc/hostidoutput of kenv -q smbios.system.uuid
MacOSIOPlatformUUID line from the output of ioreg -rd1 -c "IOPlatformExpertDevice"-
WindowsMachineGuid from registry HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography-

Privileged Machine ID Lookup

The host.id can be looked up using privileged sources. For example, Linux systems can use the output of dmidecode -t system, dmidecode -t baseboard, dmidecode -t chassis, or read the corresponding data from the filesystem (e.g. cat /sys/devices/virtual/dmi/id/product_id, cat /sys/devices/virtual/dmi/id/product_uuid, etc), however, SDK resource detector implementations MUST not collect host.id from privileged sources. If privileged lookup of host.id is required, the value should be injected via the OTEL_RESOURCE_ATTRIBUTES environment variable.