Skip to content

Commit

Permalink
Trim host-id whitespace on Linux (#141)
Browse files Browse the repository at this point in the history
Co-authored-by: Cijo Thomas <[email protected]>
  • Loading branch information
wathiede and cijothomas authored Dec 17, 2024
1 parent 30a3f4e commit 67b30de
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions opentelemetry-resource-detectors/src/host.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ fn host_id_detect() -> Option<String> {
let dbus_machine_id_path = Path::new("/var/lib/dbus/machine-id");
read_to_string(machine_id_path)
.or_else(|_| read_to_string(dbus_machine_id_path))
.map(|id| id.trim().to_string())
.ok()
}

Expand Down

0 comments on commit 67b30de

Please sign in to comment.