diff --git a/CHANGES.md b/CHANGES.md index afcc84b..d01e984 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,11 @@ +# 0.3 + + +- add explicit spans, for more precise tracing +- rename repo to ocaml-trace +- trace-tef: add a ticker thread to ensure we flush the file regularly + # 0.2 - trace-tef: additional argument to `with_setup`; env for "stdout"/"stderr" diff --git a/Makefile b/Makefile index a992a93..f575c6d 100644 --- a/Makefile +++ b/Makefile @@ -17,3 +17,12 @@ watch: dune build $(DUNE_OPTS) -w $(WATCH) .PHONY: test clean watch + +VERSION=$(shell awk '/^version:/ {print $$2}' trace.opam) + +update_next_tag: + @echo "update version to $(VERSION)..." + sed --follow-symlinks -i "s/NEXT_VERSION/$(VERSION)/g" $(wildcard src/**.ml) $(wildcard src/**.mli) \ + $(wildcard src/**/*.ml) $(wildcard src/**/*.mli) + sed --follow-symlinks -i "s/NEXT_RELEASE/$(VERSION)/g" $(wildcard src/**.ml) $(wildcard src/**.mli) \ + $(wildcard src/**/*.ml) $(wildcard src/**/*.mli) diff --git a/dune-project b/dune-project index 5b5b2ac..5d4bce1 100644 --- a/dune-project +++ b/dune-project @@ -2,7 +2,7 @@ (name trace) (generate_opam_files true) -(version 0.2) +(version 0.3) (source (github c-cube/ocaml-trace)) diff --git a/src/core/collector.ml b/src/core/collector.ml index 0ba5ffc..9758878 100644 --- a/src/core/collector.ml +++ b/src/core/collector.ml @@ -29,7 +29,7 @@ module type S = sig This replaces the previous [enter_span] and [exit_span] which were too flexible to be efficient to implement in async contexts. - @since NEXT_RELEASE *) + @since 0.3 *) val enter_manual_span : parent:explicit_span option -> @@ -47,11 +47,11 @@ module type S = sig 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}. - @since NEXT_RELEASE *) + @since 0.3 *) val exit_manual_span : explicit_span -> unit (** Exit an explicit span. - @since NEXT_RELEASE *) + @since 0.3 *) val message : ?span:span -> data:(string * user_data) list -> string -> unit (** Emit a message with associated metadata. *) diff --git a/src/core/trace_core.mli b/src/core/trace_core.mli index 6e1d1ae..66a9b18 100644 --- a/src/core/trace_core.mli +++ b/src/core/trace_core.mli @@ -51,7 +51,7 @@ val enter_manual_sub_span : start and stop on one thread, and are nested purely by their timestamp; and [`Async] spans can overlap, migrate between threads, etc. (as happens in Lwt, Eio, Async, etc.) which impacts how the collector might represent them. - @since NEXT_RELEASE *) + @since 0.3 *) val enter_manual_toplevel_span : ?flavor:[ `Sync | `Async ] -> @@ -65,7 +65,7 @@ val enter_manual_toplevel_span : [explicit_span] around until it's exited with {!exit_manual_span}. The span can be used as a parent in {!enter_manual_sub_span}. @param flavor see {!enter_manual_sub_span} for more details. - @since NEXT_RELEASE *) + @since 0.3 *) val exit_manual_span : explicit_span -> unit (** Exit an explicit span. This can be on another thread, in a @@ -73,7 +73,7 @@ val exit_manual_span : explicit_span -> unit nonetheless. The span can be obtained via {!enter_manual_sub_span} or {!enter_manual_toplevel_span}. - @since NEXT_RELEASE *) + @since 0.3 *) val message : ?span:span -> ?data:(unit -> (string * user_data) list) -> string -> unit diff --git a/trace-tef.opam b/trace-tef.opam index eed0942..16a126f 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.2" +version: "0.3" synopsis: "A simple backend for trace, emitting Catapult JSON into a file" maintainer: ["Simon Cruanes"] authors: ["Simon Cruanes"] diff --git a/trace.opam b/trace.opam index 61856b1..f485ac7 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.2" +version: "0.3" synopsis: "A stub for tracing/observability, agnostic in how data is collected" maintainer: ["Simon Cruanes"]