diff --git a/src/lwt/trace_lwt.ml b/src/lwt/trace_lwt.ml index 3962e0a..31c9487 100644 --- a/src/lwt/trace_lwt.ml +++ b/src/lwt/trace_lwt.ml @@ -45,10 +45,10 @@ let[@inline never] with_span_real_ ?parent ?(force_toplevel = false) let espan = match parent, force_toplevel with | _, true | None, _ -> - enter_manual_toplevel_span ~flavor:`Sync ?__FUNCTION__ ~__FILE__ ~__LINE__ - ?data name + enter_manual_toplevel_span ~flavor:`Async ?__FUNCTION__ ~__FILE__ + ~__LINE__ ?data name | Some parent, _ -> - enter_manual_sub_span ~parent ~flavor:`Sync ?__FUNCTION__ ~__FILE__ + enter_manual_sub_span ~parent ~flavor:`Async ?__FUNCTION__ ~__FILE__ ~__LINE__ ?data name in diff --git a/src/lwt/trace_lwt.mli b/src/lwt/trace_lwt.mli index f41a660..76f5398 100644 --- a/src/lwt/trace_lwt.mli +++ b/src/lwt/trace_lwt.mli @@ -38,7 +38,8 @@ val with_span : 'a (** [with_span ~__FILE__ ~__LINE__ name f] calls [f span] where [span] is a new span named with [name]. The span is - traced as being synchronous. + traced as being asynchronous, so each collector might represent + it differently. If [f] returns an ['a Lwt.t] future, use [with_span_lwt] instead.