mirror of
https://github.com/ocaml-tracing/ocaml-trace.git
synced 2026-03-07 18:37:56 -05:00
Compare commits
1 commit
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
41b152c789 |
2 changed files with 9 additions and 2 deletions
|
|
@ -1,7 +1,9 @@
|
||||||
(** Main type definitions *)
|
(** Main type definitions *)
|
||||||
|
|
||||||
type span = ..
|
type span = ..
|
||||||
(** A span. Its representation is defined by the current collector. *)
|
(** A span. Its representation is defined by the current collector.
|
||||||
|
|
||||||
|
This representation changed in 0.11 (from [int64] to an open sum type) *)
|
||||||
|
|
||||||
(** Information about a span's parent span, if any.
|
(** Information about a span's parent span, if any.
|
||||||
@since 0.11 *)
|
@since 0.11 *)
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
(** use [thread-local-storage] to store ambient spans.
|
(** use [thread-local-storage] to store ambient spans.
|
||||||
|
|
||||||
This doesn't work with cooperative concurrency (Eio, Lwt, etc) but is fine
|
This doesn't work with cooperative concurrency (Eio, Lwt, etc) but is fine
|
||||||
in a threaded context. *)
|
in a threaded context.
|
||||||
|
|
||||||
|
@since 0.12 *)
|
||||||
|
|
||||||
open Trace_core
|
open Trace_core
|
||||||
|
|
||||||
|
|
@ -9,6 +11,9 @@ val k_span : span Thread_local_storage.t
|
||||||
(** Key to access the current span *)
|
(** Key to access the current span *)
|
||||||
|
|
||||||
val provider : Ambient_span_provider.t
|
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
|
val setup : unit -> unit
|
||||||
(** Install the provider *)
|
(** Install the provider *)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue