diff --git a/trace/Trace/index.html b/trace/Trace/index.html index d28ae6d..91893ca 100644 --- a/trace/Trace/index.html +++ b/trace/Trace/index.html @@ -1,5 +1,5 @@ -
TraceShim that just forwards to Trace_core.
The reason is, Trace is already defined in the compiler libs and can clash with this module inside a toplevel. So it's safer to only depend on Trace_core in libraries that might end up used in a toplevel.
include module type of struct include Trace_core endtype span = Trace_core.span = ..A span. Its representation is defined by the current collector.
type parent = Trace_core.parent = | P_unknownParent is not specified at this point
*)| P_noneWe know the current span has no parent
*)| P_some of spanWe know the parent of the current span
*)Information about a span's parent span, if any.
User defined data, generally passed as key/value pairs to whatever collector is installed (if any).
type explicit_span = spantype explicit_span_ctx = spantype extension_parameter = Trace_core.extension_parameter = ..An extension parameter, used to carry information for spans/messages/metrics that can be backend-specific or just not envisioned by trace.
module Collector = Trace_core.Collectormodule Level = Trace_core.LevelIs there a collector?
This is fast, so that the traced program can check it before creating any span or message.
val get_default_level : unit -> Level.tCurrent default level for spans.
val set_default_level : Level.t -> unitSet level used for spans that do not specify it. The default default value is Level.Trace.
val with_span :
+Trace (trace.Trace) Module Trace
Shim that just forwards to Trace_core.
The reason is, Trace is already defined in the compiler libs and can clash with this module inside a toplevel. So it's safer to only depend on Trace_core in libraries that might end up used in a toplevel.
include module type of struct include Trace_core end
type span = Trace_core.span = ..A span. Its representation is defined by the current collector.
type parent = Trace_core.parent = | P_unknown(*Parent is not specified at this point
*)| P_none(*We know the current span has no parent
*)| P_some of span(*We know the parent of the current span
*)
Information about a span's parent span, if any.
User defined data, generally passed as key/value pairs to whatever collector is installed (if any).
type explicit_span = spantype explicit_span_ctx = spantype extension_parameter = Trace_core.extension_parameter = ..An extension parameter, used to carry information for spans/messages/metrics that can be backend-specific or just not envisioned by trace.
type metric = Trace_core.metric = ..A metric, can be of many types. See Core_ext for some builtin metrics.
module Collector = Trace_core.Collectormodule Level = Trace_core.LevelTracing
Is there a collector?
This is fast, so that the traced program can check it before creating any span or message.
val get_default_level : unit -> Level.tCurrent default level for spans.
val set_default_level : Level.t -> unitSet level used for spans that do not specify it. The default default value is Level.Trace.
val with_span :
?level:Level.t ->
?__FUNCTION__:string ->
__FILE__:string ->
@@ -31,19 +31,25 @@
?params:extension_parameter list ->
?data:(unit -> (string * user_data) list) ->
((('a, Stdlib.Format.formatter, unit, unit) format4 -> 'a) -> unit) ->
- unitmessagef (fun k->k"hello %s %d!" "world" 42) is like message "hello world 42!" but only computes the string formatting if a collector is installed.
See message for a description of the other arguments.
Give a name to the current thread. This might be used by the collector to display traces in a more informative way.
Uses Core_ext.Extension_set_thread_name since NEXT_RELEASE
Give a name to the current process. This might be used by the collector to display traces in a more informative way.
Uses Core_ext.Extension_set_process_name since NEXT_RELEASE
messagef (fun k->k"hello %s %d!" "world" 42) is like message "hello world 42!" but only computes the string formatting if a collector is installed.
See message for a description of the other arguments.
Give a name to the current thread. This might be used by the collector to display traces in a more informative way.
Uses Core_ext.Extension_set_thread_name since NEXT_RELEASE
Give a name to the current process. This might be used by the collector to display traces in a more informative way.
Uses Core_ext.Extension_set_process_name since NEXT_RELEASE
val metric :
+ ?level:Level.t ->
+ ?params:extension_parameter list ->
+ ?data:(unit -> (string * user_data) list) ->
+ string ->
+ metric ->
+ unitEmit a metric. Metrics are an extensible type, each collector might support a different subset.
val counter_int :
?level:Level.t ->
?params:extension_parameter list ->
?data:(unit -> (string * user_data) list) ->
string ->
int ->
- unitEmit a counter of type int. Counters represent the evolution of some quantity over time.
Emit a counter of type int via metric. Counters represent the evolution of some quantity over time.
val counter_float :
?level:Level.t ->
?params:extension_parameter list ->
?data:(unit -> (string * user_data) list) ->
string ->
float ->
- unitEmit a counter of type float. See counter_int for more details.
Collector
type collector = Collector.tAn event collector. See Collector for more details.
val setup_collector : collector -> unitsetup_collector c installs c as the current collector.
val get_current_level : unit -> Level.tGet current level. This is only meaningful if a collector was set up with setup_collector.
val set_current_level : Level.t -> unitSet the current level of tracing. This only has a visible effect if a collector was installed with setup_collector.
shutdown () shutdowns the current collector, if one was installed, and waits for it to terminate before returning.
val with_setup_collector : Collector.t -> (unit -> 'a) -> 'awith_setup_collector c f installs c, calls f(), and shutdowns c once f() is done.
Extensions
val extension_event : extension_event -> unitTrigger an extension event, whose meaning depends on the library that defines it. Some collectors will simply ignore it. This does nothing if no collector is setup.
Core extensions
module Core_ext = Trace_core.Core_extDeprecated
Emit a counter of type float via metric. See counter_int for more details.
Collector
type collector = Collector.tAn event collector. See Collector for more details.
val setup_collector : collector -> unitsetup_collector c installs c as the current collector.
val get_current_level : unit -> Level.tGet current level. This is only meaningful if a collector was set up with setup_collector.
val set_current_level : Level.t -> unitSet the current level of tracing. This only has a visible effect if a collector was installed with setup_collector.
shutdown () shutdowns the current collector, if one was installed, and waits for it to terminate before returning.
val with_setup_collector : Collector.t -> (unit -> 'a) -> 'awith_setup_collector c f installs c, calls f(), and shutdowns c once f() is done.
Extensions
val extension_event : ?level:Level.t -> extension_event -> unitTrigger an extension event, whose meaning depends on the library that defines it. Some collectors will simply ignore it. This does nothing if no collector is setup.
Core extensions
module Core_ext = Trace_core.Core_extDeprecated
val enter_manual_span :
parent:explicit_span_ctx option ->
?flavor:[ `Sync | `Async ] ->
?level:Level.t ->
diff --git a/trace/Trace_core/Collector/Callbacks/index.html b/trace/Trace_core/Collector/Callbacks/index.html
index f788522..feee146 100644
--- a/trace/Trace_core/Collector/Callbacks/index.html
+++ b/trace/Trace_core/Collector/Callbacks/index.html
@@ -3,6 +3,7 @@
__FUNCTION__:string option ->
__FILE__:string ->
__LINE__:int ->
+ level:Level.t ->
params:Trace_core__.Types.extension_parameter list ->
data:
(string
@@ -24,6 +25,7 @@
| `None ])
list ->
unit;message : 'st ->
+ level:Level.t ->
params:Trace_core__.Types.extension_parameter list ->
data:
(string
@@ -35,7 +37,8 @@
list ->
span:Trace_core__.Types.span option ->
string ->
- unit;(*Emit a message or log
*)counter_int : 'st ->
+ unit;(*Emit a message or log
*)metric : 'st ->
+ level:Level.t ->
params:Trace_core__.Types.extension_parameter list ->
data:
(string
@@ -46,25 +49,14 @@
| `None ])
list ->
string ->
- int ->
- unit;(*Integer counter.
*)counter_float : 'st ->
- params:Trace_core__.Types.extension_parameter list ->
- data:
- (string
- * [ `Int of int
- | `String of string
- | `Bool of bool
- | `Float of float
- | `None ])
- list ->
- string ->
- float ->
- unit;extension : 'st -> Trace_core__.Types.extension_event -> unit;(*Collector-specific extension
*)init : 'st -> unit;(*Called on initialization
*)shutdown : 'st -> unit;(*Shutdown collector, possibly waiting for it to finish sending data.
*)}Callbacks taking a state 'st
val make :
+ Trace_core__.Types.metric ->
+ unit;(*Metric .
*)extension : 'st -> level:Level.t -> Trace_core__.Types.extension_event -> unit;(*Collector-specific extension. It now has a level as well.
*)init : 'st -> unit;(*Called on initialization
*)shutdown : 'st -> unit;(*Shutdown collector, possibly waiting for it to finish sending data.
*)}Callbacks taking a state 'st
val make :
enter_span:
('a ->
__FUNCTION__:string option ->
__FILE__:string ->
__LINE__:int ->
+ level:Level.t ->
params:Trace_core__.Types.extension_parameter list ->
data:
(string
@@ -91,6 +83,7 @@
unit) ->
message:
('a ->
+ level:Level.t ->
params:Trace_core__.Types.extension_parameter list ->
data:
(string
@@ -103,8 +96,9 @@
span:Trace_core__.Types.span option ->
string ->
unit) ->
- counter_int:
+ metric:
('a ->
+ level:Level.t ->
params:Trace_core__.Types.extension_parameter list ->
data:
(string
@@ -115,23 +109,10 @@
| `None ])
list ->
string ->
- int ->
+ Trace_core__.Types.metric ->
unit) ->
- counter_float:
- ('a ->
- params:Trace_core__.Types.extension_parameter list ->
- data:
- (string
- * [ `Int of int
- | `String of string
- | `Bool of bool
- | `Float of float
- | `None ])
- list ->
- string ->
- float ->
- unit) ->
- ?extension:('a -> Trace_core__.Types.extension_event -> unit) ->
+ ?extension:
+ ('a -> level:Level.t -> Trace_core__.Types.extension_event -> unit) ->
?init:('a -> unit) ->
?shutdown:('a -> unit) ->
unit ->
diff --git a/trace/Trace_core/Core_ext/index.html b/trace/Trace_core/Core_ext/index.html
index 5b83378..6f2663e 100644
--- a/trace/Trace_core/Core_ext/index.html
+++ b/trace/Trace_core/Core_ext/index.html
@@ -1,2 +1,2 @@
-Core_ext (trace.Trace_core.Core_ext) Module Trace_core.Core_ext
A few core extensions.
+Core_ext (trace.Trace_core.Core_ext) Module Trace_core.Core_ext
A few core extensions.
diff --git a/trace/Trace_core/index.html b/trace/Trace_core/index.html
index ca80701..936e543 100644
--- a/trace/Trace_core/index.html
+++ b/trace/Trace_core/index.html
@@ -1,5 +1,5 @@
-Trace_core (trace.Trace_core) Module Trace_core
Main tracing interface.
This interface is intended to be lightweight and usable in both libraries and applications. It has very low overhead if no Collector.t is installed.
type parent = | P_unknown(*Parent is not specified at this point
*)| P_none(*We know the current span has no parent
*)| P_some of span(*We know the parent of the current span
*)
Information about a span's parent span, if any.
User defined data, generally passed as key/value pairs to whatever collector is installed (if any).
type explicit_span = spantype explicit_span_ctx = spanAn extension parameter, used to carry information for spans/messages/metrics that can be backend-specific or just not envisioned by trace.
module Collector : sig ... endA global collector.
module Level : sig ... endTracing levels.
Tracing
Is there a collector?
This is fast, so that the traced program can check it before creating any span or message.
val get_default_level : unit -> Level.tCurrent default level for spans.
val set_default_level : Level.t -> unitSet level used for spans that do not specify it. The default default value is Level.Trace.
val with_span :
+Trace_core (trace.Trace_core) Module Trace_core
Main tracing interface.
This interface is intended to be lightweight and usable in both libraries and applications. It has very low overhead if no Collector.t is installed.
type parent = | P_unknown(*Parent is not specified at this point
*)| P_none(*We know the current span has no parent
*)| P_some of span(*We know the parent of the current span
*)
Information about a span's parent span, if any.
User defined data, generally passed as key/value pairs to whatever collector is installed (if any).
type explicit_span = spantype explicit_span_ctx = spanAn extension parameter, used to carry information for spans/messages/metrics that can be backend-specific or just not envisioned by trace.
A metric, can be of many types. See Core_ext for some builtin metrics.
module Collector : sig ... endA global collector.
module Level : sig ... endTracing levels.
Tracing
Is there a collector?
This is fast, so that the traced program can check it before creating any span or message.
val get_default_level : unit -> Level.tCurrent default level for spans.
val set_default_level : Level.t -> unitSet level used for spans that do not specify it. The default default value is Level.Trace.
val with_span :
?level:Level.t ->
?__FUNCTION__:string ->
__FILE__:string ->
@@ -31,19 +31,25 @@
?params:extension_parameter list ->
?data:(unit -> (string * user_data) list) ->
((('a, Stdlib.Format.formatter, unit, unit) format4 -> 'a) -> unit) ->
- unitmessagef (fun k->k"hello %s %d!" "world" 42) is like message "hello world 42!" but only computes the string formatting if a collector is installed.
See message for a description of the other arguments.
Give a name to the current thread. This might be used by the collector to display traces in a more informative way.
Uses Core_ext.Extension_set_thread_name since NEXT_RELEASE
Give a name to the current process. This might be used by the collector to display traces in a more informative way.
Uses Core_ext.Extension_set_process_name since NEXT_RELEASE
messagef (fun k->k"hello %s %d!" "world" 42) is like message "hello world 42!" but only computes the string formatting if a collector is installed.
See message for a description of the other arguments.
Give a name to the current thread. This might be used by the collector to display traces in a more informative way.
Uses Core_ext.Extension_set_thread_name since NEXT_RELEASE
Give a name to the current process. This might be used by the collector to display traces in a more informative way.
Uses Core_ext.Extension_set_process_name since NEXT_RELEASE
val metric :
+ ?level:Level.t ->
+ ?params:extension_parameter list ->
+ ?data:(unit -> (string * user_data) list) ->
+ string ->
+ metric ->
+ unitEmit a metric. Metrics are an extensible type, each collector might support a different subset.
val counter_int :
?level:Level.t ->
?params:extension_parameter list ->
?data:(unit -> (string * user_data) list) ->
string ->
int ->
- unitEmit a counter of type int. Counters represent the evolution of some quantity over time.
Emit a counter of type int via metric. Counters represent the evolution of some quantity over time.
val counter_float :
?level:Level.t ->
?params:extension_parameter list ->
?data:(unit -> (string * user_data) list) ->
string ->
float ->
- unitEmit a counter of type float. See counter_int for more details.
Collector
type collector = Collector.tAn event collector. See Collector for more details.
val setup_collector : collector -> unitsetup_collector c installs c as the current collector.
val get_current_level : unit -> Level.tGet current level. This is only meaningful if a collector was set up with setup_collector.
val set_current_level : Level.t -> unitSet the current level of tracing. This only has a visible effect if a collector was installed with setup_collector.
shutdown () shutdowns the current collector, if one was installed, and waits for it to terminate before returning.
val with_setup_collector : Collector.t -> (unit -> 'a) -> 'awith_setup_collector c f installs c, calls f(), and shutdowns c once f() is done.
Extensions
val extension_event : extension_event -> unitTrigger an extension event, whose meaning depends on the library that defines it. Some collectors will simply ignore it. This does nothing if no collector is setup.
Core extensions
module Core_ext : sig ... endA few core extensions.
Deprecated
Emit a counter of type float via metric. See counter_int for more details.
Collector
type collector = Collector.tAn event collector. See Collector for more details.
val setup_collector : collector -> unitsetup_collector c installs c as the current collector.
val get_current_level : unit -> Level.tGet current level. This is only meaningful if a collector was set up with setup_collector.
val set_current_level : Level.t -> unitSet the current level of tracing. This only has a visible effect if a collector was installed with setup_collector.
shutdown () shutdowns the current collector, if one was installed, and waits for it to terminate before returning.
val with_setup_collector : Collector.t -> (unit -> 'a) -> 'awith_setup_collector c f installs c, calls f(), and shutdowns c once f() is done.
Extensions
val extension_event : ?level:Level.t -> extension_event -> unitTrigger an extension event, whose meaning depends on the library that defines it. Some collectors will simply ignore it. This does nothing if no collector is setup.
Core extensions
module Core_ext : sig ... endA few core extensions.
Deprecated
val enter_manual_span :
parent:explicit_span_ctx option ->
?flavor:[ `Sync | `Async ] ->
?level:Level.t ->