OpenTelemetry PHP

HostIncubatingAttributes

Semantic attributes and corresponding values for host.

Tags
see
https://opentelemetry.io/docs/specs/semconv/registry/attributes/host/

May contain @experimental Semantic Conventions which may change or be removed in the future.

Table of Contents

Constants

HOST_ARCH  : mixed = 'host.arch'
The CPU architecture the host system is running on.
HOST_ARCH_VALUE_AMD64  : mixed = 'amd64'
AMD64
HOST_ARCH_VALUE_ARM32  : mixed = 'arm32'
ARM32
HOST_ARCH_VALUE_ARM64  : mixed = 'arm64'
ARM64
HOST_ARCH_VALUE_IA64  : mixed = 'ia64'
Itanium
HOST_ARCH_VALUE_PPC32  : mixed = 'ppc32'
32-bit PowerPC
HOST_ARCH_VALUE_PPC64  : mixed = 'ppc64'
64-bit PowerPC
HOST_ARCH_VALUE_S390X  : mixed = 's390x'
IBM z/Architecture
HOST_ARCH_VALUE_X86  : mixed = 'x86'
32-bit x86
HOST_CPU_CACHE_L2_SIZE  : mixed = 'host.cpu.cache.l2.size'
The amount of level 2 memory cache available to the processor (in Bytes).
HOST_CPU_FAMILY  : mixed = 'host.cpu.family'
Family or generation of the CPU.
HOST_CPU_MODEL_ID  : mixed = 'host.cpu.model.id'
Model identifier. It provides more granular information about the CPU, distinguishing it from other CPUs within the same family.
HOST_CPU_MODEL_NAME  : mixed = 'host.cpu.model.name'
Model designation of the processor.
HOST_CPU_STEPPING  : mixed = 'host.cpu.stepping'
Stepping or core revisions.
HOST_CPU_VENDOR_ID  : mixed = 'host.cpu.vendor.id'
Processor manufacturer identifier. A maximum 12-character string.
HOST_ID  : mixed = 'host.id'
Unique host ID, determined by the first matching source in the priority order.
HOST_IMAGE_ID  : mixed = 'host.image.id'
VM image ID or host OS image ID. For Cloud, this value is from the provider.
HOST_IMAGE_NAME  : mixed = 'host.image.name'
Name of the VM image or OS install the host was instantiated from.
HOST_IMAGE_VERSION  : mixed = 'host.image.version'
The version string of the VM image or host OS as defined in [Version Attributes](/docs/resource/README.md#version-attributes).
HOST_IP  : mixed = 'host.ip'
Available IP addresses of the host, excluding loopback interfaces.
HOST_MAC  : mixed = 'host.mac'
Available MAC addresses of the host, excluding loopback interfaces.
HOST_NAME  : mixed = 'host.name'
Name 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.
HOST_TYPE  : mixed = 'host.type'
Type of host. For Cloud, this must be the machine type.

Constants

HOST_ARCH

The CPU architecture the host system is running on.

public mixed HOST_ARCH = 'host.arch'
Tags
experimental

HOST_CPU_CACHE_L2_SIZE

The amount of level 2 memory cache available to the processor (in Bytes).

public mixed HOST_CPU_CACHE_L2_SIZE = 'host.cpu.cache.l2.size'
Tags
experimental

HOST_CPU_FAMILY

Family or generation of the CPU.

public mixed HOST_CPU_FAMILY = 'host.cpu.family'
Tags
experimental

HOST_CPU_MODEL_ID

Model identifier. It provides more granular information about the CPU, distinguishing it from other CPUs within the same family.

public mixed HOST_CPU_MODEL_ID = 'host.cpu.model.id'
Tags
experimental

HOST_CPU_MODEL_NAME

Model designation of the processor.

public mixed HOST_CPU_MODEL_NAME = 'host.cpu.model.name'
Tags
experimental

HOST_CPU_STEPPING

Stepping or core revisions.

public mixed HOST_CPU_STEPPING = 'host.cpu.stepping'
Tags
experimental

HOST_CPU_VENDOR_ID

Processor manufacturer identifier. A maximum 12-character string.

public mixed HOST_CPU_VENDOR_ID = 'host.cpu.vendor.id'

CPUID command returns the vendor ID string in EBX, EDX and ECX registers. Writing these to memory in this order results in a 12-character string.

Tags
experimental

HOST_ID

Unique host ID, determined by the first matching source in the priority order.

public mixed HOST_ID = 'host.id'

SHOULD be determined using the first available source from the following priority tiers:

  1. Known cloud vendors - cloud instance ID
  2. Known VM vendors - provider VM ID
  3. OS-dependent machine ID
  4. User-provided value

The value SHOULD conform to the following properties:

  • Unique within a given context;
  • Repeatable - multiple observers on the same host come up with the same value;
  • Persistent - survives host restarts and software updates.

Collecting host.id From Known Environments: When host.id is derived from a cloud vendor instance ID, the resource SHOULD also carry the corresponding cloud.provider and cloud.platform attributes so that the source of the host.id value can be unambiguously determined.

The following cloud environments are currently recognized:

Environment host.id source cloud.provider cloud.platform
AWS EC2 EC2 instance ID aws aws_ec2
AWS EKS (node) EC2 instance ID aws aws_eks
Azure VM vmId azure azure.vm
GCP Compute Engine GCE instance ID gcp gcp_compute_engine
GCP GKE (node) GCE instance ID gcp gcp_kubernetes_engine

The listed cloud.provider/cloud.platform values are for example only. Refer to the cloud attribute definitions for the relevant set of values.

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.

OS Primary Fallback
Linux contents of /etc/machine-id contents of /var/lib/dbus/machine-id
BSD contents of /etc/hostid output of /bin/kenv -q smbios.system.uuid
macOS IOPlatformUUID line from the output of /usr/sbin/ioreg -rd1 -c "IOPlatformExpertDevice" -
Windows MachineGuid 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.

Collecting host.id From User Configuration: If none of the above sources yields a non-empty value, the implementation MAY be unable to determine host.id automatically and SHOULD omit the attribute. In that case, the host.id can only be provided through user configuration or other available manual options. Users SHOULD ensure that the host.id value conforms to the properties stated above.

Tags
experimental

HOST_IMAGE_ID

VM image ID or host OS image ID. For Cloud, this value is from the provider.

public mixed HOST_IMAGE_ID = 'host.image.id'
Tags
experimental

HOST_IMAGE_NAME

Name of the VM image or OS install the host was instantiated from.

public mixed HOST_IMAGE_NAME = 'host.image.name'
Tags
experimental

HOST_IMAGE_VERSION

The version string of the VM image or host OS as defined in [Version Attributes](/docs/resource/README.md#version-attributes).

public mixed HOST_IMAGE_VERSION = 'host.image.version'
Tags
experimental

HOST_IP

Available IP addresses of the host, excluding loopback interfaces.

public mixed HOST_IP = 'host.ip'

IPv4 Addresses MUST be specified in dotted-quad notation. IPv6 addresses MUST be specified in the RFC 5952 format.

Tags
experimental

HOST_MAC

Available MAC addresses of the host, excluding loopback interfaces.

public mixed HOST_MAC = 'host.mac'

MAC Addresses MUST be represented in IEEE RA hexadecimal form: as hyphen-separated octets in uppercase hexadecimal form from most to least significant.

Tags
experimental

HOST_NAME

Name 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.

public mixed HOST_NAME = 'host.name'
Tags
experimental

HOST_TYPE

Type of host. For Cloud, this must be the machine type.

public mixed HOST_TYPE = 'host.type'
Tags
experimental
On this page

Search results