@@ -39,7 +39,7 @@ impl Processor {
39
39
let event_count = read_array_len ( & mut rd) . unwrap ( ) ;
40
40
41
41
for _ in 0 ..event_count {
42
- self . process_event ( & strings, & mut rd) ;
42
+ self . process_event ( & mut strings, & mut rd) ;
43
43
}
44
44
}
45
45
@@ -51,7 +51,7 @@ impl Processor {
51
51
self . exporter . export ( finished_traces) . await ;
52
52
}
53
53
54
- fn process_event < R : Read > ( & mut self , strings : & [ String ] , mut rd : R ) {
54
+ fn process_event < R : Read > ( & mut self , strings : & mut Vec < String > , mut rd : R ) {
55
55
read_array_len ( & mut rd) . unwrap ( ) ;
56
56
57
57
let event_type = read_u64 ( & mut rd) . unwrap ( ) ;
@@ -63,10 +63,21 @@ impl Processor {
63
63
4 => self . process_start_span ( strings, rd) ,
64
64
5 => self . process_finish_span ( strings, rd) ,
65
65
6 => self . process_add_tags ( strings, rd) ,
66
+ 7 => self . process_strings ( strings, rd) ,
66
67
_ => ( )
67
68
}
68
69
}
69
70
71
+ fn process_strings < R : Read > ( & mut self , strings : & mut Vec < String > , mut rd : R ) {
72
+ let size = read_array_len ( & mut rd) . unwrap ( ) ;
73
+
74
+ strings. reserve ( size as usize ) ;
75
+
76
+ for _ in 0 ..size {
77
+ strings. push ( read_str ( & mut rd) ) ;
78
+ }
79
+ }
80
+
70
81
fn process_add_error < R : Read > ( & mut self , strings : & [ String ] , mut rd : R ) {
71
82
let size = read_array_len ( & mut rd) . unwrap ( ) ;
72
83
0 commit comments