This commit is contained in:
Simon Cruanes 2023-12-17 23:41:42 -05:00
parent 8bd11619a1
commit e3d385a2cd
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4

View file

@ -121,7 +121,7 @@ val counter_float :
(** Emit a counter of type [float]. See {!counter_int} for more details. (** Emit a counter of type [float]. See {!counter_int} for more details.
@param data metadata for this metric (since 0.4) *) @param data metadata for this metric (since 0.4) *)
val enter_context : string -> unit val enter_context : ?data:(unit -> (string * user_data) list) -> string -> unit
(** [enter_context name] enters a local context with the (** [enter_context name] enters a local context with the
given name. The name must be a static string. given name. The name must be a static string.
@ -131,12 +131,13 @@ val enter_context : string -> unit
@since NEXT_RELEASE *) @since NEXT_RELEASE *)
val exit_context : string -> unit val exit_context : ?data:(unit -> (string * user_data) list) -> string -> unit
(** Exit a context. This must come after the corresponding (** Exit a context. This must come after the corresponding
{!enter_context}, ideally on the same thread. {!enter_context}, ideally on the same thread.
@since NEXT_RELEASE *) @since NEXT_RELEASE *)
val with_context : string -> (unit -> 'a) -> 'a val with_context :
?data:(unit -> (string * user_data) list) -> string -> (unit -> 'a) -> 'a
(** [with_context name f] enters the context, calls [f()], (** [with_context name f] enters the context, calls [f()],
and exits the context. and exits the context.
@since NEXT_RELEASE *) @since NEXT_RELEASE *)