Skip to content

Commit

Permalink
Trim host-id whitespace on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
wathiede committed Dec 14, 2024
1 parent c27ebcc commit 5e92826
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 5e92826

Please sign in to comment.