Skip to content

Commit 62063f3

Browse files
committed
prepare for 0.7
1 parent e76a977 commit 62063f3

File tree

8 files changed

+27
-20
lines changed

8 files changed

+27
-20
lines changed

CHANGES.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11

2+
# 0.7
3+
4+
- feat: add levels to `Trace_core`. Levels are similar to `logs` levels, to help control verbosity.
5+
- add hmap as a depopt (#28)
6+
7+
- fix: truncate large strings in fuchsia
8+
29
# 0.6
310

411
- add `ppx_trace` for easier instrumentation.

dune-project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
(name trace)
44
(generate_opam_files true)
5-
(version 0.6)
5+
(version 0.7)
66

77
(source
88
(github c-cube/ocaml-trace))

ppx_trace.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This file is generated by dune, edit dune-project instead
22
opam-version: "2.0"
3-
version: "0.6"
3+
version: "0.7"
44
synopsis: "A ppx-based preprocessor for trace"
55
maintainer: ["Simon Cruanes"]
66
authors: ["Simon Cruanes"]

src/core/level.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
down the application or overwhelm the tracing system; yet
77
they might be useful in debug situations.
88
9-
@since NEXT_RELEASE *)
9+
@since 0.7 *)
1010

1111
(** Level of tracing. These levels are in increasing order, i.e if
1212
level [Debug1] is enabled, everything below it (Error, Warning, Info, etc.)
1313
are also enabled.
14-
@since NEXT_RELEASE *)
14+
@since 0.7 *)
1515
type t =
1616
| Error (** Only errors *)
1717
| Warning (** Warnings *)
@@ -21,7 +21,7 @@ type t =
2121
| Debug3 (** Maximum verbosity debugging level *)
2222
| Trace (** Enable everything (default level) *)
2323

24-
(** @since NEXT_RELEASE *)
24+
(** @since 0.7 *)
2525
let to_string : t -> string = function
2626
| Error -> "error"
2727
| Warning -> "warning"

src/core/trace_core.mli

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ val enabled : unit -> bool
2424

2525
val get_default_level : unit -> Level.t
2626
(** Current default level for spans.
27-
@since NEXT_RELEASE *)
27+
@since 0.7 *)
2828

2929
val set_default_level : Level.t -> unit
3030
(** Set level used for spans that do not specify it. The default
3131
default value is [Level.Trace].
32-
@since NEXT_RELEASE *)
32+
@since 0.7 *)
3333

3434
val with_span :
3535
?level:Level.t ->
@@ -47,7 +47,7 @@ val with_span :
4747
4848
This is the recommended way to instrument most code.
4949
50-
@param level optional level for this span. since NEXT_RELEASE.
50+
@param level optional level for this span. since 0.7.
5151
Default is set via {!set_default_level}.
5252
5353
{b NOTE} an important restriction is that this is only supposed to
@@ -67,7 +67,7 @@ val enter_span :
6767
span
6868
(** Enter a span manually.
6969
70-
@param level optional level for this span. since NEXT_RELEASE.
70+
@param level optional level for this span. since 0.7.
7171
Default is set via {!set_default_level}. *)
7272

7373
val exit_span : span -> unit
@@ -98,7 +98,7 @@ val enter_manual_sub_span :
9898
start and stop on one thread, and are nested purely by their timestamp;
9999
and [`Async] spans can overlap, migrate between threads, etc. (as happens in
100100
Lwt, Eio, Async, etc.) which impacts how the collector might represent them.
101-
@param level optional level for this span. since NEXT_RELEASE.
101+
@param level optional level for this span. since 0.7.
102102
Default is set via {!set_default_level}.
103103
@since 0.3 *)
104104

@@ -115,7 +115,7 @@ val enter_manual_toplevel_span :
115115
[explicit_span] around until it's exited with {!exit_manual_span}.
116116
The span can be used as a parent in {!enter_manual_sub_span}.
117117
@param flavor see {!enter_manual_sub_span} for more details.
118-
@param level optional level for this span. since NEXT_RELEASE.
118+
@param level optional level for this span. since 0.7.
119119
Default is set via {!set_default_level}.
120120
@since 0.3 *)
121121

@@ -140,7 +140,7 @@ val message :
140140
unit
141141
(** [message msg] logs a message [msg] (if a collector is installed).
142142
Additional metadata can be provided.
143-
@param level optional level for this span. since NEXT_RELEASE.
143+
@param level optional level for this span. since 0.7.
144144
Default is set via {!set_default_level}.
145145
@param span the surrounding span, if any. This might be ignored by the collector. *)
146146

@@ -153,7 +153,7 @@ val messagef :
153153
(** [messagef (fun k->k"hello %s %d!" "world" 42)] is like
154154
[message "hello world 42!"] but only computes the string formatting
155155
if a collector is installed.
156-
@param level optional level for this span. since NEXT_RELEASE.
156+
@param level optional level for this span. since 0.7.
157157
Default is set via {!set_default_level}. *)
158158

159159
val set_thread_name : string -> unit
@@ -174,7 +174,7 @@ val counter_int :
174174
unit
175175
(** Emit a counter of type [int]. Counters represent the evolution of some quantity
176176
over time.
177-
@param level optional level for this span. since NEXT_RELEASE.
177+
@param level optional level for this span. since 0.7.
178178
Default is set via {!set_default_level}.
179179
@param data metadata for this metric (since 0.4) *)
180180

@@ -185,7 +185,7 @@ val counter_float :
185185
float ->
186186
unit
187187
(** Emit a counter of type [float]. See {!counter_int} for more details.
188-
@param level optional level for this span. since NEXT_RELEASE.
188+
@param level optional level for this span. since 0.7.
189189
Default is set via {!set_default_level}.
190190
@param data metadata for this metric (since 0.4) *)
191191

@@ -204,12 +204,12 @@ val setup_collector : collector -> unit
204204
val get_current_level : unit -> Level.t
205205
(** Get current level. This is only meaningful if
206206
a collector was set up with {!setup_collector}.
207-
@since NEXT_RELEASE *)
207+
@since 0.7 *)
208208

209209
val set_current_level : Level.t -> unit
210210
(** Set the current level of tracing. This only has a visible
211211
effect if a collector was installed with {!setup_collector}.
212-
@since NEXT_RELEASE *)
212+
@since 0.7 *)
213213

214214
val shutdown : unit -> unit
215215
(** [shutdown ()] shutdowns the current collector, if one was installed,

trace-fuchsia.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This file is generated by dune, edit dune-project instead
22
opam-version: "2.0"
3-
version: "0.6"
3+
version: "0.7"
44
synopsis:
55
"A high-performance backend for trace, emitting a Fuchsia trace into a file"
66
maintainer: ["Simon Cruanes"]

trace-tef.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This file is generated by dune, edit dune-project instead
22
opam-version: "2.0"
3-
version: "0.6"
3+
version: "0.7"
44
synopsis:
55
"A simple backend for trace, emitting Catapult/TEF JSON into a file"
66
maintainer: ["Simon Cruanes"]

trace.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This file is generated by dune, edit dune-project instead
22
opam-version: "2.0"
3-
version: "0.6"
3+
version: "0.7"
44
synopsis:
55
"A stub for tracing/observability, agnostic in how data is collected"
66
maintainer: ["Simon Cruanes"]

0 commit comments

Comments
 (0)