Skip to content

Commit

Permalink
prepare for 0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
c-cube committed Aug 9, 2023
1 parent 82aa762 commit 91c9da3
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 9 deletions.
7 changes: 7 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

(name trace)
(generate_opam_files true)
(version 0.2)
(version 0.3)

(source
(github c-cube/ocaml-trace))
Expand Down
6 changes: 3 additions & 3 deletions src/core/collector.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ->
Expand All @@ -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. *)
Expand Down
6 changes: 3 additions & 3 deletions src/core/trace_core.mli
Original file line number Diff line number Diff line change
Expand Up @@ -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 ] ->
Expand All @@ -65,15 +65,15 @@ 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
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}.
@since NEXT_RELEASE *)
@since 0.3 *)

val message :
?span:span -> ?data:(unit -> (string * user_data) list) -> string -> unit
Expand Down
2 changes: 1 addition & 1 deletion trace-tef.opam
Original file line number Diff line number Diff line change
@@ -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"]
Expand Down
2 changes: 1 addition & 1 deletion trace.opam
Original file line number Diff line number Diff line change
@@ -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"]
Expand Down

0 comments on commit 91c9da3

Please sign in to comment.