Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

host.id resource auto-detection #3811

Closed
mwear opened this issue Feb 27, 2023 · 0 comments · Fixed by #3812
Closed

host.id resource auto-detection #3811

mwear opened this issue Feb 27, 2023 · 0 comments · Fixed by #3812
Assignees
Labels
enhancement New feature or request

Comments

@mwear
Copy link
Member

mwear commented Feb 27, 2023

Problem Statement

I would like to be able collect host.id for non-containerized environments.

Proposed Solution

There is currently a spec PR: open-telemetry/opentelemetry-specification#3173 that proposes using the following sources to collect host.id per platform:

OS Primary Fallback
Linux contents of /etc/machine-id contents of /var/lib/dbus/machine-id
BSD contents of /etc/hostid output of kenv -q smbios.system.uuid
MacOS IOPlatformUUID line from the output of ioreg -rd1 -c "IOPlatformExpertDevice" -
Windows MachineGuid from registry HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography -

Alternatives

We could use off the shelf libraries, although they differ in implementation from what is specified. It would also be a dependency we do not control.

Prior Art

Similar libraries:

This is the JS implementation of the spec proposal:
open-telemetry/opentelemetry-js#3575

Here is a PR that attempts to address the same problem in the collector (using gopsutil):
open-telemetry/opentelemetry-collector-contrib#18740

Additional Context

I have an implementation that I will open as a PR shortly. Please assign this issue to me.

@mwear mwear added the enhancement New feature or request label Feb 27, 2023
@Aneurysm9 Aneurysm9 linked a pull request Feb 27, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant