Class HostIdResource
java.lang.Object
io.opentelemetry.instrumentation.resources.HostIdResource
ResourceProvider for automatically configuring host.id according to the
semantic conventions.
The lookup is non-privileged and OS specific:
- Linux:
/etc/machine-id, falling back to/var/lib/dbus/machine-id - BSD:
/etc/hostid, falling back to/bin/kenv -q smbios.system.uuid - macOS: the
IOPlatformUUIDfrom/usr/sbin/ioreg -rd1 -c IOPlatformExpertDevice - Windows: the
MachineGuidregistry value
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDeprecated.This constant is no longer used and will be removed in a future release. -
Method Summary
Modifier and TypeMethodDescriptionstatic io.opentelemetry.sdk.resources.Resourceget()Returns aResourcecontaining thehost.idresource attribute.
-
Field Details
-
REGISTRY_QUERY
Deprecated.This constant is no longer used and will be removed in a future release. The Windows registry is now queried using an absolute path toreg.exe.- See Also:
-
-
Method Details
-
get
public static io.opentelemetry.sdk.resources.Resource get()Returns aResourcecontaining thehost.idresource attribute.
-