@@ -95,16 +95,16 @@ mod tests {
95
95
vec ! [
96
96
// Context with sampled
97
97
( SpanContext :: new(
98
- TraceId :: from_u128 ( 0x4bf9_2f35_77b3_4da6_a3ce_929d_0e0e_4736 ) ,
99
- SpanId :: from_u64 ( 0x00f0_67aa_0ba9_02b7 ) , TraceFlags :: SAMPLED , true , TraceState :: default ( ) ) , [
98
+ TraceId :: from ( 0x4bf9_2f35_77b3_4da6_a3ce_929d_0e0e_4736 ) ,
99
+ SpanId :: from ( 0x00f0_67aa_0ba9_02b7 ) , TraceFlags :: SAMPLED , true , TraceState :: default ( ) ) , [
100
100
0x00 , 0x00 , 0x4b , 0xf9 , 0x2f , 0x35 , 0x77 , 0xb3 , 0x4d , 0xa6 , 0xa3 , 0xce , 0x92 , 0x9d , 0x0e , 0x0e , 0x47 , 0x36 ,
101
101
0x01 , 0x00 , 0xf0 , 0x67 , 0xaa , 0x0b , 0xa9 , 0x02 , 0xb7 ,
102
102
0x02 , 0x01 ,
103
103
] ) ,
104
104
// Context without sampled
105
105
( SpanContext :: new(
106
- TraceId :: from_u128 ( 0x4bf9_2f35_77b3_4da6_a3ce_929d_0e0e_4736 ) ,
107
- SpanId :: from_u64 ( 0x00f0_67aa_0ba9_02b7 ) , TraceFlags :: default ( ) , true , TraceState :: default ( ) ) , [
106
+ TraceId :: from ( 0x4bf9_2f35_77b3_4da6_a3ce_929d_0e0e_4736 ) ,
107
+ SpanId :: from ( 0x00f0_67aa_0ba9_02b7 ) , TraceFlags :: default ( ) , true , TraceState :: default ( ) ) , [
108
108
0x00 , 0x00 , 0x4b , 0xf9 , 0x2f , 0x35 , 0x77 , 0xb3 , 0x4d , 0xa6 , 0xa3 , 0xce , 0x92 , 0x9d , 0x0e , 0x0e , 0x47 , 0x36 ,
109
109
0x01 , 0x00 , 0xf0 , 0x67 , 0xaa , 0x0b , 0xa9 , 0x02 , 0xb7 ,
110
110
0x02 , 0x00 ,
@@ -118,19 +118,19 @@ mod tests {
118
118
fn from_bytes_data ( ) -> Vec < ( SpanContext , Vec < u8 > ) > {
119
119
vec ! [
120
120
// Future version of the proto
121
- ( SpanContext :: new( TraceId :: from_u128 ( 0x4bf9_2f35_77b3_4da6_a3ce_929d_0e0e_4736 ) , SpanId :: from_u64 ( 0x00f0_67aa_0ba9_02b7 ) , TraceFlags :: SAMPLED , true , TraceState :: default ( ) ) , vec![
121
+ ( SpanContext :: new( TraceId :: from ( 0x4bf9_2f35_77b3_4da6_a3ce_929d_0e0e_4736 ) , SpanId :: from ( 0x00f0_67aa_0ba9_02b7 ) , TraceFlags :: SAMPLED , true , TraceState :: default ( ) ) , vec![
122
122
0x02 , 0x00 , 0x4b , 0xf9 , 0x2f , 0x35 , 0x77 , 0xb3 , 0x4d , 0xa6 , 0xa3 , 0xce , 0x92 , 0x9d , 0x0e , 0x0e , 0x47 , 0x36 ,
123
123
0x01 , 0x00 , 0xf0 , 0x67 , 0xaa , 0x0b , 0xa9 , 0x02 , 0xb7 ,
124
124
0x02 , 0x01 ,
125
125
] ) ,
126
126
// current version with sampled
127
- ( SpanContext :: new( TraceId :: from_u128 ( 0x4bf9_2f35_77b3_4da6_a3ce_929d_0e0e_4736 ) , SpanId :: from_u64 ( 0x00f0_67aa_0ba9_02b7 ) , TraceFlags :: SAMPLED , true , TraceState :: default ( ) ) , vec![
127
+ ( SpanContext :: new( TraceId :: from ( 0x4bf9_2f35_77b3_4da6_a3ce_929d_0e0e_4736 ) , SpanId :: from ( 0x00f0_67aa_0ba9_02b7 ) , TraceFlags :: SAMPLED , true , TraceState :: default ( ) ) , vec![
128
128
0x02 , 0x00 , 0x4b , 0xf9 , 0x2f , 0x35 , 0x77 , 0xb3 , 0x4d , 0xa6 , 0xa3 , 0xce , 0x92 , 0x9d , 0x0e , 0x0e , 0x47 , 0x36 ,
129
129
0x01 , 0x00 , 0xf0 , 0x67 , 0xaa , 0x0b , 0xa9 , 0x02 , 0xb7 ,
130
130
0x02 , 0x01 ,
131
131
] ) ,
132
132
// valid context without option
133
- ( SpanContext :: new( TraceId :: from_u128 ( 0x4bf9_2f35_77b3_4da6_a3ce_929d_0e0e_4736 ) , SpanId :: from_u64 ( 0x00f0_67aa_0ba9_02b7 ) , TraceFlags :: default ( ) , true , TraceState :: default ( ) ) , vec![
133
+ ( SpanContext :: new( TraceId :: from ( 0x4bf9_2f35_77b3_4da6_a3ce_929d_0e0e_4736 ) , SpanId :: from ( 0x00f0_67aa_0ba9_02b7 ) , TraceFlags :: default ( ) , true , TraceState :: default ( ) ) , vec![
134
134
0x00 , 0x00 , 0x4b , 0xf9 , 0x2f , 0x35 , 0x77 , 0xb3 , 0x4d , 0xa6 , 0xa3 , 0xce , 0x92 , 0x9d , 0x0e , 0x0e , 0x47 , 0x36 ,
135
135
0x01 , 0x00 , 0xf0 , 0x67 , 0xaa , 0x0b , 0xa9 , 0x02 , 0xb7 ,
136
136
] ) ,
0 commit comments