Skip to main content

Module machine_id

Module machine_id 

Source
Expand description

Host machine identifier, mirroring pkg/util/uuid.GetUUID() in the Go agent.

PlatformSource
Linux/sys/class/dmi/id/product_uuid then /etc/machine-id/proc/sys/kernel/random/boot_id
macOSgethostuuid(3)
WindowsHKLM\SOFTWARE\Microsoft\Cryptography\MachineGuid
Other""

All values are normalised to lowercase xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. Returns "" on failure rather than a random UUID — the backend can detect a missing value but not a wrong one.

Functions§

get_machine_id
Returns the host machine ID as a lowercase hyphenated UUID, cached for the process lifetime. Returns "" on failure or unsupported platforms.