@@ -93,9 +93,39 @@ impl LogShipper {
93
93
println ! ( "Log shipper connected" ) ;
94
94
95
95
while let Result :: Ok ( message) = self . msg_rx . recv ( ) {
96
+ // // If actor id is not provided, extract from logs
97
+ // let actor_id = if self.actor_id.is_some() {
98
+ // self.actor_id.as_deref()
99
+ // } else {
100
+ // if let Some(start_idx) = message.message.find("actor_") {
101
+ // let start_idx = start_idx + 6;
102
+
103
+ // // Look for next non alphanum (end of actor id)
104
+ // let end_idx = if let Some(end_idx) =
105
+ // message.message[start_idx..].find(|c: char| !c.is_ascii_alphanumeric())
106
+ // {
107
+ // start_idx + end_idx
108
+ // } else {
109
+ // message.message.len()
110
+ // };
111
+
112
+ // let actor_id = &message.message[start_idx..end_idx];
113
+
114
+ // // Check if valid id
115
+ // rivet_util::Id::parse(actor_id).is_ok().then_some(actor_id)
116
+ // } else {
117
+ // None
118
+ // }
119
+ // };
120
+
121
+ // // Cannot determine actor id, ignore log
122
+ // let Some(actor_id) = actor_id else {
123
+ // continue;
124
+ // };
125
+
96
126
let vector_message = VectorMessage :: Actors {
97
- // runner_id: self.runner_id.as_str(),
98
- actor_id : self . actor_id . as_ref ( ) . map ( |x| x . as_str ( ) ) ,
127
+ runner_id : self . runner_id . as_str ( ) ,
128
+ actor_id : self . actor_id . as_deref ( ) ,
99
129
env_id : self . env_id ,
100
130
stream_type : message. stream_type as u8 ,
101
131
ts : message. ts ,
@@ -118,7 +148,7 @@ impl LogShipper {
118
148
enum VectorMessage < ' a > {
119
149
#[ serde( rename = "actors" ) ]
120
150
Actors {
121
- // runner_id: &'a str,
151
+ runner_id : & ' a str ,
122
152
actor_id : Option < & ' a str > ,
123
153
env_id : Uuid ,
124
154
stream_type : u8 ,
0 commit comments