diff --git a/ppx_trace/_doc-dir/CHANGES.md b/ppx_trace/_doc-dir/CHANGES.md index 0d68d50..55db48f 100644 --- a/ppx_trace/_doc-dir/CHANGES.md +++ b/ppx_trace/_doc-dir/CHANGES.md @@ -1,9 +1,21 @@ -# 0.10 (wip) +# 0.10 - breaking: manual spans now take a `explicit_span_ctx` as parent, that can potentially be transmitted across processes/machines. It also is intended to be more compatible with OTEL. -- depopt on unix for TEF timestamps +- breaking `trace.subscriber`: timestamps are `int64`ns now, not floats +- breaking `trace`: pass a `string` trace_id in manual spans, which helps + for backends such as opentelemetry. It's also useful for extensions. + +- refactor `trace-fuchsia`: full revamp of the library, modularized, using subscriber API +- refactor `trace-tef`: split into exporter,writer,subscriber, using subscriber API +- feat: add `trace.event`, useful for background threads +- feat `trace.subscriber`: add `Span_tbl`, and a depopt on picos_aux +- feat `trace.subscriber`: tee a whole array at once +- feat tef-tldrs: use EMIT_TEF_AT_EXIT +- feat `trace.subscriber`: depopt on unix for timestamps +- refactor `trace-tef`: depopt on unix for TEF timestamps + # 0.9.1 diff --git a/trace-fuchsia/_doc-dir/CHANGES.md b/trace-fuchsia/_doc-dir/CHANGES.md index 0d68d50..55db48f 100644 --- a/trace-fuchsia/_doc-dir/CHANGES.md +++ b/trace-fuchsia/_doc-dir/CHANGES.md @@ -1,9 +1,21 @@ -# 0.10 (wip) +# 0.10 - breaking: manual spans now take a `explicit_span_ctx` as parent, that can potentially be transmitted across processes/machines. It also is intended to be more compatible with OTEL. -- depopt on unix for TEF timestamps +- breaking `trace.subscriber`: timestamps are `int64`ns now, not floats +- breaking `trace`: pass a `string` trace_id in manual spans, which helps + for backends such as opentelemetry. It's also useful for extensions. + +- refactor `trace-fuchsia`: full revamp of the library, modularized, using subscriber API +- refactor `trace-tef`: split into exporter,writer,subscriber, using subscriber API +- feat: add `trace.event`, useful for background threads +- feat `trace.subscriber`: add `Span_tbl`, and a depopt on picos_aux +- feat `trace.subscriber`: tee a whole array at once +- feat tef-tldrs: use EMIT_TEF_AT_EXIT +- feat `trace.subscriber`: depopt on unix for timestamps +- refactor `trace-tef`: depopt on unix for TEF timestamps + # 0.9.1 diff --git a/trace-tef/_doc-dir/CHANGES.md b/trace-tef/_doc-dir/CHANGES.md index 0d68d50..55db48f 100644 --- a/trace-tef/_doc-dir/CHANGES.md +++ b/trace-tef/_doc-dir/CHANGES.md @@ -1,9 +1,21 @@ -# 0.10 (wip) +# 0.10 - breaking: manual spans now take a `explicit_span_ctx` as parent, that can potentially be transmitted across processes/machines. It also is intended to be more compatible with OTEL. -- depopt on unix for TEF timestamps +- breaking `trace.subscriber`: timestamps are `int64`ns now, not floats +- breaking `trace`: pass a `string` trace_id in manual spans, which helps + for backends such as opentelemetry. It's also useful for extensions. + +- refactor `trace-fuchsia`: full revamp of the library, modularized, using subscriber API +- refactor `trace-tef`: split into exporter,writer,subscriber, using subscriber API +- feat: add `trace.event`, useful for background threads +- feat `trace.subscriber`: add `Span_tbl`, and a depopt on picos_aux +- feat `trace.subscriber`: tee a whole array at once +- feat tef-tldrs: use EMIT_TEF_AT_EXIT +- feat `trace.subscriber`: depopt on unix for timestamps +- refactor `trace-tef`: depopt on unix for TEF timestamps + # 0.9.1 diff --git a/trace/Trace/index.html b/trace/Trace/index.html index 68d4dae..6b2a40e 100644 --- a/trace/Trace/index.html +++ b/trace/Trace/index.html @@ -1,5 +1,5 @@ -
Traceinclude module type of struct include Trace_core endA bytestring representing a (possibly distributed) trace made of async spans. With opentelemetry this is 16 bytes.
User defined data, generally passed as key/value pairs to whatever collector is installed (if any).
A context, passed around for async traces.
type explicit_span = Trace_core.explicit_span = {span : span;Identifier for this span. Several explicit spans might share the same identifier since we can differentiate between them via meta.
trace_id : trace_id;The trace this belongs to
*)mutable meta : Trace_core.Meta_map.t;Metadata for this span (and its context). This can be used by collectors to carry collector-specific information from the beginning of the span, to the end of the span.
*)}Explicit span, with collector-specific metadata. This is richer than explicit_span_ctx but not intended to be passed around (or sent across the wire), unlike explicit_span_ctx.
module Collector = Trace_core.Collectormodule Meta_map = Trace_core.Meta_mapmodule 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 ctx_of_span : explicit_span -> explicit_span_ctxTurn a span into a span context.
val with_span :
+Trace (trace.Trace) Module Trace
include module type of struct include Trace_core end
A bytestring representing a (possibly distributed) trace made of async spans. With opentelemetry this is 16 bytes.
User defined data, generally passed as key/value pairs to whatever collector is installed (if any).
A context, passed around for async traces.
type explicit_span = Trace_core.explicit_span = {span : span;(*Identifier for this span. Several explicit spans might share the same identifier since we can differentiate between them via meta.
*)trace_id : trace_id;(*The trace this belongs to
*)mutable meta : Trace_core.Meta_map.t;(*Metadata for this span (and its context). This can be used by collectors to carry collector-specific information from the beginning of the span, to the end of the span.
*)
}Explicit span, with collector-specific metadata. This is richer than explicit_span_ctx but not intended to be passed around (or sent across the wire), unlike explicit_span_ctx.
module Collector = Trace_core.Collectormodule Meta_map = Trace_core.Meta_mapmodule 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 ctx_of_span : explicit_span -> explicit_span_ctxTurn a span into a span context.
val with_span :
?level:Level.t ->
?__FUNCTION__:string ->
__FILE__:string ->
@@ -23,7 +23,7 @@
__LINE__:int ->
?data:(unit -> (string * user_data) list) ->
string ->
- explicit_spanLike with_span but the caller is responsible for obtaining the parent span from their own caller, and carry the resulting explicit_span to the matching exit_manual_span.
NOTE this replaces enter_manual_sub_span and enter_manual_toplevel_span by just making parent an explicit option. It is breaking anyway because we now pass an explicit_span_ctx instead of a full explicit_span (the reason being that we might receive this explicit_span_ctx from another process or machine).
val enter_manual_sub_span :
+ explicit_spanLike with_span but the caller is responsible for obtaining the parent span from their own caller, and carry the resulting explicit_span to the matching exit_manual_span.
NOTE this replaces enter_manual_sub_span and enter_manual_toplevel_span by just making parent an explicit option. It is breaking anyway because we now pass an explicit_span_ctx instead of a full explicit_span (the reason being that we might receive this explicit_span_ctx from another process or machine).
val enter_manual_sub_span :
parent:explicit_span ->
?flavor:[ `Sync | `Async ] ->
?level:Level.t ->
@@ -32,7 +32,7 @@
__LINE__:int ->
?data:(unit -> (string * user_data) list) ->
string ->
- explicit_spanval enter_manual_toplevel_span :
+ explicit_spanval enter_manual_toplevel_span :
?flavor:[ `Sync | `Async ] ->
?level:Level.t ->
?__FUNCTION__:string ->
@@ -40,7 +40,7 @@
__LINE__:int ->
?data:(unit -> (string * user_data) list) ->
string ->
- explicit_spanval exit_manual_span : explicit_span -> unitExit an explicit span. This can be on another thread, in a fiber or lightweight thread, etc. and will be supported by backends nonetheless. The span can be obtained via enter_manual_sub_span or enter_manual_toplevel_span.
val add_data_to_manual_span :
+ explicit_spanval exit_manual_span : explicit_span -> unitExit an explicit span. This can be on another thread, in a fiber or lightweight thread, etc. and will be supported by backends nonetheless. The span can be obtained via enter_manual_sub_span or enter_manual_toplevel_span.
val add_data_to_manual_span :
explicit_span ->
(string * user_data) list ->
unitadd_data_explicit esp data adds data to the span esp. The behavior is not specified is the span has been exited already.
val message :
diff --git a/trace/Trace_core/Collector/module-type-S/index.html b/trace/Trace_core/Collector/module-type-S/index.html
index d5b3641..544cfdc 100644
--- a/trace/Trace_core/Collector/module-type-S/index.html
+++ b/trace/Trace_core/Collector/module-type-S/index.html
@@ -41,7 +41,7 @@
| `None ])
list ->
string ->
- Trace_core__.Types.explicit_spanEnter an explicit span. Surrounding scope, if any, is provided by parent, and this function can store as much metadata as it wants in the hmap in the explicit_span's meta field.
NOTE the parent argument is now an explicit_span_ctx and not an explicit_span since NEXT_RELEASE.
This means that the collector doesn't need to implement contextual storage mapping span to scopes, metadata, etc. on its side; everything can be transmitted in the explicit_span.
Enter an explicit span. Surrounding scope, if any, is provided by parent, and this function can store as much metadata as it wants in the hmap in the explicit_span's meta field.
NOTE the parent argument is now an explicit_span_ctx and not an explicit_span since 0.10.
This means that the collector doesn't need to implement contextual storage mapping span to scopes, metadata, etc. on its side; everything can be transmitted in the explicit_span.
val add_data_to_span :
int64 ->
(string
* [ `Int of int
diff --git a/trace/Trace_core/index.html b/trace/Trace_core/index.html
index ceeeab7..5d12fb2 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
Trace.
A bytestring representing a (possibly distributed) trace made of async spans. With opentelemetry this is 16 bytes.
User defined data, generally passed as key/value pairs to whatever collector is installed (if any).
type explicit_span = {span : span;(*Identifier for this span. Several explicit spans might share the same identifier since we can differentiate between them via meta.
*)trace_id : trace_id;(*The trace this belongs to
*)mutable meta : Meta_map.t;(*Metadata for this span (and its context). This can be used by collectors to carry collector-specific information from the beginning of the span, to the end of the span.
*)
}Explicit span, with collector-specific metadata. This is richer than explicit_span_ctx but not intended to be passed around (or sent across the wire), unlike explicit_span_ctx.
module Collector : sig ... endA global collector.
module Meta_map : sig ... endmodule 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 ctx_of_span : explicit_span -> explicit_span_ctxTurn a span into a span context.
val with_span :
+Trace_core (trace.Trace_core) Module Trace_core
Trace.
A bytestring representing a (possibly distributed) trace made of async spans. With opentelemetry this is 16 bytes.
User defined data, generally passed as key/value pairs to whatever collector is installed (if any).
type explicit_span = {span : span;(*Identifier for this span. Several explicit spans might share the same identifier since we can differentiate between them via meta.
*)trace_id : trace_id;(*The trace this belongs to
*)mutable meta : Meta_map.t;(*Metadata for this span (and its context). This can be used by collectors to carry collector-specific information from the beginning of the span, to the end of the span.
*)
}Explicit span, with collector-specific metadata. This is richer than explicit_span_ctx but not intended to be passed around (or sent across the wire), unlike explicit_span_ctx.
module Collector : sig ... endA global collector.
module Meta_map : sig ... endmodule 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 ctx_of_span : explicit_span -> explicit_span_ctxTurn a span into a span context.
val with_span :
?level:Level.t ->
?__FUNCTION__:string ->
__FILE__:string ->
@@ -23,7 +23,7 @@
__LINE__:int ->
?data:(unit -> (string * user_data) list) ->
string ->
- explicit_spanLike with_span but the caller is responsible for obtaining the parent span from their own caller, and carry the resulting explicit_span to the matching exit_manual_span.
NOTE this replaces enter_manual_sub_span and enter_manual_toplevel_span by just making parent an explicit option. It is breaking anyway because we now pass an explicit_span_ctx instead of a full explicit_span (the reason being that we might receive this explicit_span_ctx from another process or machine).
val enter_manual_sub_span :
+ explicit_spanLike with_span but the caller is responsible for obtaining the parent span from their own caller, and carry the resulting explicit_span to the matching exit_manual_span.
NOTE this replaces enter_manual_sub_span and enter_manual_toplevel_span by just making parent an explicit option. It is breaking anyway because we now pass an explicit_span_ctx instead of a full explicit_span (the reason being that we might receive this explicit_span_ctx from another process or machine).
val enter_manual_sub_span :
parent:explicit_span ->
?flavor:[ `Sync | `Async ] ->
?level:Level.t ->
@@ -32,7 +32,7 @@
__LINE__:int ->
?data:(unit -> (string * user_data) list) ->
string ->
- explicit_spanval enter_manual_toplevel_span :
+ explicit_spanval enter_manual_toplevel_span :
?flavor:[ `Sync | `Async ] ->
?level:Level.t ->
?__FUNCTION__:string ->
@@ -40,7 +40,7 @@
__LINE__:int ->
?data:(unit -> (string * user_data) list) ->
string ->
- explicit_spanval exit_manual_span : explicit_span -> unitExit an explicit span. This can be on another thread, in a fiber or lightweight thread, etc. and will be supported by backends nonetheless. The span can be obtained via enter_manual_sub_span or enter_manual_toplevel_span.
val add_data_to_manual_span :
+ explicit_spanval exit_manual_span : explicit_span -> unitExit an explicit span. This can be on another thread, in a fiber or lightweight thread, etc. and will be supported by backends nonetheless. The span can be obtained via enter_manual_sub_span or enter_manual_toplevel_span.
val add_data_to_manual_span :
explicit_span ->
(string * user_data) list ->
unitadd_data_explicit esp data adds data to the span esp. The behavior is not specified is the span has been exited already.
val message :
diff --git a/trace/Trace_event/Event/index.html b/trace/Trace_event/Event/index.html
index 49d41da..8092489 100644
--- a/trace/Trace_event/Event/index.html
+++ b/trace/Trace_event/Event/index.html
@@ -1,2 +1,2 @@
-Event (trace.Trace_event.Event) Module Trace_event.Event
module Sub = Trace_subscribertype t = | E_tick| E_init of {}| E_shutdown of {}| E_message of {tid : int;msg : string;time_ns : int64;data : (string * Sub.user_data) list;
}| E_define_span of {tid : int;name : string;time_ns : int64;id : Trace_core.span;fun_name : string option;data : (string * Sub.user_data) list;
}| E_exit_span of {id : Trace_core.span;time_ns : int64;
}| E_add_data of {id : Trace_core.span;data : (string * Sub.user_data) list;
}| E_enter_manual_span of {tid : int;name : string;time_ns : int64;id : Trace_core.trace_id;flavor : Sub.flavor option;fun_name : string option;data : (string * Sub.user_data) list;
}| E_exit_manual_span of {tid : int;name : string;time_ns : int64;flavor : Sub.flavor option;data : (string * Sub.user_data) list;id : Trace_core.trace_id;
}| E_counter of {}| E_name_process of {}| E_name_thread of {}| E_extension_event of {tid : int;time_ns : int64;ext : Trace_core.extension_event;
}
An event with TEF/fuchsia semantics
\ No newline at end of file
+Event (trace.Trace_event.Event) Module Trace_event.Event
Events.
Each callback in a subscriber corresponds to an event, which can be for example queued somewhere or batched for further processing.
module Sub = Trace_subscribertype t = | E_tick| E_init of {}| E_shutdown of {}| E_message of {tid : int;msg : string;time_ns : int64;data : (string * Sub.user_data) list;
}| E_define_span of {tid : int;name : string;time_ns : int64;id : Trace_core.span;fun_name : string option;data : (string * Sub.user_data) list;
}| E_exit_span of {id : Trace_core.span;time_ns : int64;
}| E_add_data of {id : Trace_core.span;data : (string * Sub.user_data) list;
}| E_enter_manual_span of {tid : int;name : string;time_ns : int64;id : Trace_core.trace_id;flavor : Sub.flavor option;fun_name : string option;data : (string * Sub.user_data) list;
}| E_exit_manual_span of {tid : int;name : string;time_ns : int64;flavor : Sub.flavor option;data : (string * Sub.user_data) list;id : Trace_core.trace_id;
}| E_counter of {}| E_name_process of {}| E_name_thread of {}| E_extension_event of {tid : int;time_ns : int64;ext : Trace_core.extension_event;
}
An event with TEF/fuchsia semantics
\ No newline at end of file
diff --git a/trace/Trace_event/Subscriber/index.html b/trace/Trace_event/Subscriber/index.html
index bb74ac3..ef568d1 100644
--- a/trace/Trace_event/Subscriber/index.html
+++ b/trace/Trace_event/Subscriber/index.html
@@ -1,3 +1,3 @@
-Subscriber (trace.Trace_event.Subscriber) Module Trace_event.Subscriber
Callback for events
module Callbacks :
- Trace_event.Event.Sub.Callbacks.S with type st = event_consumerval subscriber : event_consumer -> Trace_event.Event.Sub.t
\ No newline at end of file
+Subscriber (trace.Trace_event.Subscriber) Module Trace_event.Subscriber
Subscriber that emits events
Callback for events.
module Callbacks :
+ Trace_event.Event.Sub.Callbacks.S with type st = event_consumerval subscriber : event_consumer -> Trace_event.Event.Sub.tA subscriber that turns calls into events that are passed to the event_consumer
\ No newline at end of file
diff --git a/trace/Trace_event/index.html b/trace/Trace_event/index.html
index 3f42532..ef6072a 100644
--- a/trace/Trace_event/index.html
+++ b/trace/Trace_event/index.html
@@ -1,2 +1,2 @@
-Trace_event (trace.Trace_event) Module Trace_event
module Event : sig ... endmodule Subscriber : sig ... end
\ No newline at end of file
+Trace_event (trace.Trace_event) Module Trace_event
module Event : sig ... endEvents.
module Subscriber : sig ... endSubscriber that emits events
\ No newline at end of file
diff --git a/trace/_doc-dir/CHANGES.md b/trace/_doc-dir/CHANGES.md
index 0d68d50..55db48f 100644
--- a/trace/_doc-dir/CHANGES.md
+++ b/trace/_doc-dir/CHANGES.md
@@ -1,9 +1,21 @@
-# 0.10 (wip)
+# 0.10
- breaking: manual spans now take a `explicit_span_ctx` as parent, that
can potentially be transmitted across processes/machines. It also
is intended to be more compatible with OTEL.
-- depopt on unix for TEF timestamps
+- breaking `trace.subscriber`: timestamps are `int64`ns now, not floats
+- breaking `trace`: pass a `string` trace_id in manual spans, which helps
+ for backends such as opentelemetry. It's also useful for extensions.
+
+- refactor `trace-fuchsia`: full revamp of the library, modularized, using subscriber API
+- refactor `trace-tef`: split into exporter,writer,subscriber, using subscriber API
+- feat: add `trace.event`, useful for background threads
+- feat `trace.subscriber`: add `Span_tbl`, and a depopt on picos_aux
+- feat `trace.subscriber`: tee a whole array at once
+- feat tef-tldrs: use EMIT_TEF_AT_EXIT
+- feat `trace.subscriber`: depopt on unix for timestamps
+- refactor `trace-tef`: depopt on unix for TEF timestamps
+
# 0.9.1