diff --git a/CHANGES.md b/CHANGES.md index 89274fb..b07408c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,12 @@ +# 0.12 + +- use `current_span` when entering spans or sending messages +- add `Trace.Ambient_span_provider.t` concept, to track the current span. + It is not part of the collector and is optional. +- add `trace.thread-local-storage` optional library that implements the `Ambient_span_provider.t` +- add a runtime events collector, + test, in `trace-runtime-events` +- add `{thread,process}_sort_index` extension + TEF support + # 0.11 - entire rework of the collector, now lighter, and using an open sum type diff --git a/dune-project b/dune-project index 1850f8f..b66d80f 100644 --- a/dune-project +++ b/dune-project @@ -4,7 +4,7 @@ (generate_opam_files true) -(version 0.11) +(version 0.12) (source (github ocaml-tracing/ocaml-trace)) @@ -98,9 +98,10 @@ "A simple collector relying on runtime-events for OCaml 5. Some assembly required.") (depends (ocaml - (>= 5.0)) + (>= 5.1)) (trace (= :version)) + (ppx_trace (and (= :version) :with-test)) base-bigarray base-unix dune) diff --git a/ppx_trace.opam b/ppx_trace.opam index 10b4574..6e8602f 100644 --- a/ppx_trace.opam +++ b/ppx_trace.opam @@ -1,6 +1,6 @@ # This file is generated by dune, edit dune-project instead opam-version: "2.0" -version: "0.11" +version: "0.12" synopsis: "A ppx-based preprocessor for trace" maintainer: ["Simon Cruanes"] authors: ["Simon Cruanes"] diff --git a/src/core/ambient_span_provider.ml b/src/core/ambient_span_provider.ml index 3f7c480..e9032ca 100644 --- a/src/core/ambient_span_provider.ml +++ b/src/core/ambient_span_provider.ml @@ -1,5 +1,5 @@ (** Access/set the current span from some ambient context. - @since NEXT_RELEASE *) + @since 0.12 *) open Types diff --git a/src/core/trace_core.mli b/src/core/trace_core.mli index fd8215c..2be494b 100644 --- a/src/core/trace_core.mli +++ b/src/core/trace_core.mli @@ -184,7 +184,7 @@ val counter_float : val current_span : unit -> span option (** Access the current span from some ambient scope, {b if supported}. This is only supported if a {!Ambient_span_provider} has been set up. - @since NEXT_RELEASE *) + @since 0.12 *) val with_current_span_set_to : span -> (span -> 'a) -> 'a (** [with_current_span_set_to span f] sets the span as current span, enters @@ -195,7 +195,7 @@ val with_current_span_set_to : span -> (span -> 'a) -> 'a Automatically called by {!with_span}. - @since NEXT_RELEASE *) + @since 0.12 *) (** {2 Collector} *) @@ -230,7 +230,7 @@ val with_setup_collector : Collector.t -> (unit -> 'a) -> 'a val set_ambient_context_provider : Ambient_span_provider.t -> unit (** Install a provider for {!current_span} and {!with_current_span_set_to}. The default provider does nothing (ie [current_span ()] is always [None]). - @since NEXT_RELEASE *) + @since 0.12 *) (** {2 Extensions} *) diff --git a/src/runtime-events/trace_runtime_events.mli b/src/runtime-events/trace_runtime_events.mli index a57ea17..026a771 100644 --- a/src/runtime-events/trace_runtime_events.mli +++ b/src/runtime-events/trace_runtime_events.mli @@ -1,6 +1,6 @@ (** Simple collector that emits trace events via Runtime_events. - @since NEXT_RELEASE *) + @since 0.12 *) (** {2 Event types for decoding} *) diff --git a/trace-fuchsia.opam b/trace-fuchsia.opam index 0dc6639..831c6bd 100644 --- a/trace-fuchsia.opam +++ b/trace-fuchsia.opam @@ -1,6 +1,6 @@ # This file is generated by dune, edit dune-project instead opam-version: "2.0" -version: "0.11" +version: "0.12" synopsis: "A high-performance backend for trace, emitting a Fuchsia trace into a file" maintainer: ["Simon Cruanes"] diff --git a/trace-runtime-events.opam b/trace-runtime-events.opam index 9f09fd4..e16c1f4 100644 --- a/trace-runtime-events.opam +++ b/trace-runtime-events.opam @@ -1,6 +1,6 @@ # This file is generated by dune, edit dune-project instead opam-version: "2.0" -version: "0.11" +version: "0.12" synopsis: "A simple collector relying on runtime-events for OCaml 5. Some assembly required." maintainer: ["Simon Cruanes"] @@ -10,8 +10,9 @@ tags: ["trace" "tracing" "trace" "runtime-events"] homepage: "https://github.com/ocaml-tracing/ocaml-trace" bug-reports: "https://github.com/ocaml-tracing/ocaml-trace/issues" depends: [ - "ocaml" {>= "5.0"} + "ocaml" {>= "5.1"} "trace" {= version} + "ppx_trace" {= version & with-test} "base-bigarray" "base-unix" "dune" {>= "2.9"} diff --git a/trace-tef.opam b/trace-tef.opam index 2f50695..9881892 100644 --- a/trace-tef.opam +++ b/trace-tef.opam @@ -1,6 +1,6 @@ # This file is generated by dune, edit dune-project instead opam-version: "2.0" -version: "0.11" +version: "0.12" synopsis: "A simple backend for trace, emitting Catapult/TEF JSON into a file" maintainer: ["Simon Cruanes"] diff --git a/trace.opam b/trace.opam index f7922ed..3ee351a 100644 --- a/trace.opam +++ b/trace.opam @@ -1,6 +1,6 @@ # This file is generated by dune, edit dune-project instead opam-version: "2.0" -version: "0.11" +version: "0.12" synopsis: "A lightweight stub for tracing/observability, agnostic in how data is collected" description: """