Skip to content

Commit 025a1ad

Browse files
authored
Export system type in startup record.
1 parent 8f42605 commit 025a1ad

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

crates/rrg/src/startup.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ pub struct Startup {
1414
/// Time at which the agent was started.
1515
pub agent_started: std::time::SystemTime,
1616
// TOOD(@panhania): Add support for the `os_booted` field.
17+
pub os_kind: ospect::os::Kind,
1718
}
1819

1920
impl Startup {
@@ -31,6 +32,7 @@ impl Startup {
3132
path,
3233
args: std::env::args().collect(),
3334
agent_started: std::time::SystemTime::now(),
35+
os_kind: ospect::os::kind(),
3436
}
3537
}
3638
}
@@ -105,6 +107,7 @@ impl Into<rrg_proto::startup::Startup> for Startup {
105107
}
106108
proto.set_args(self.args.into());
107109
proto.set_agent_startup_time(into_timestamp(self.agent_started));
110+
proto.set_os_type(self.os_kind.into());
108111

109112
proto
110113
}

proto/rrg/startup.proto

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ package rrg.startup;
88

99
import "google/protobuf/timestamp.proto";
1010
import "rrg/fs.proto";
11+
import "rrg/os.proto";
1112

1213
// Information about the agent startup.
1314
//
@@ -24,6 +25,8 @@ message Startup {
2425
google.protobuf.Timestamp agent_startup_time = 3;
2526
// Time at which the operating system booted.
2627
google.protobuf.Timestamp os_boot_time = 4;
28+
// Type of the operating system.
29+
rrg.os.Type os_type = 6;
2730
}
2831

2932
// Metadata about the RRG agent.

0 commit comments

Comments
 (0)