mirror of
https://github.com/ocaml-tracing/ocaml-trace.git
synced 2026-03-07 18:37:56 -05:00
19 lines
549 B
OCaml
19 lines
549 B
OCaml
(** use [thread-local-storage] to store ambient spans.
|
|
|
|
This doesn't work with cooperative concurrency (Eio, Lwt, etc) but is fine
|
|
in a threaded context.
|
|
|
|
@since 0.12 *)
|
|
|
|
open Trace_core
|
|
|
|
val k_span : span Thread_local_storage.t
|
|
(** Key to access the current span *)
|
|
|
|
val provider : Ambient_span_provider.t
|
|
(** Provider that uses [Thread_local_storage] to store the current ambient span.
|
|
This works well when concurrency is based on thread, or if there is no
|
|
concurrency. *)
|
|
|
|
val setup : unit -> unit
|
|
(** Install the provider *)
|