File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -256,6 +256,16 @@ mod observe {
256
256
}
257
257
}
258
258
259
+ impl From < opentelemetry:: trace:: TraceFlags > for traces:: TraceFlags {
260
+ fn from ( flags : opentelemetry:: trace:: TraceFlags ) -> Self {
261
+ if flags. is_sampled ( ) {
262
+ traces:: TraceFlags :: SAMPLED
263
+ } else {
264
+ traces:: TraceFlags :: empty ( )
265
+ }
266
+ }
267
+ }
268
+
259
269
impl TryFrom < traces:: SpanContext > for opentelemetry:: trace:: SpanContext {
260
270
type Error = wasmtime:: Error ;
261
271
@@ -286,7 +296,7 @@ mod observe {
286
296
( ( whole >> 64 ) as u64 , whole as u64 )
287
297
} ,
288
298
span_id : u64:: from_le_bytes ( sc. span_id ( ) . to_bytes ( ) ) ,
289
- trace_flags : traces :: TraceFlags :: all ( ) , // TODO(Caleb): This is broken
299
+ trace_flags : sc . trace_flags ( ) . into ( ) ,
290
300
is_remote : sc. is_remote ( ) ,
291
301
trace_state : sc
292
302
. trace_state ( )
You can’t perform that action at this time.
0 commit comments