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 {
256256 }
257257 }
258258
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+
259269 impl TryFrom < traces:: SpanContext > for opentelemetry:: trace:: SpanContext {
260270 type Error = wasmtime:: Error ;
261271
@@ -286,7 +296,7 @@ mod observe {
286296 ( ( whole >> 64 ) as u64 , whole as u64 )
287297 } ,
288298 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 ( ) ,
290300 is_remote : sc. is_remote ( ) ,
291301 trace_state : sc
292302 . trace_state ( )
You can’t perform that action at this time.
0 commit comments