Skip to content

Commit

Permalink
prepare for 0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
c-cube committed Jan 9, 2024
1 parent 987b571 commit 5c5fdde
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 12 deletions.
10 changes: 10 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@

# 0.6

- add `ppx_trace` for easier instrumentation.
* `let%trace span = "foo" in …` will enter a scope `span` named "foo"
* `let%trace () = "foo" in …` will enter a scope named "foo" with a hidden name
- add `trace-fuchsia` backend, which produces traces in the binary format
of [fuchsia](https://fuchsia.dev/fuchsia-src/reference/tracing/trace-format).
These traces are reasonably efficient to produce (~60ns per span on my machines)
and reasonably compact on disk, at least compared to the TEF backend.

# 0.5

- perf: reduce overhead in trace-tef
Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
This small library provides basic types that can be used to instrument
a library or application, either by hand or via a ppx.

### Features
## Features

- [x] spans
- [x] messages
- [x] counters
- [ ] other metrics?
- [x] ppx to help instrumentation

### Usage
## Usage

To instrument your code, you can simply add `trace` to your dune/opam files, and then
write code like such:
Expand Down Expand Up @@ -138,13 +138,15 @@ In your `library` or `executable` stanza, add: `(preprocess (pps ppx_trace))`.
The dependency on `trace.core` is automatically added. You still need to
configure a backend to actually do collection.

### Backends
## Backends

Concrete tracing or observability formats such as:

- [ ] Fuchsia (see [tracing](https://github.com/janestreet/tracing))
- [x] Fuchsia (see [the spec](https://fuchsia.dev/fuchsia-src/reference/tracing/trace-format) and [tracing](https://github.com/janestreet/tracing).
Can be opened in https://ui.perfetto.dev)
- Catapult
* [x] light bindings here with `trace-tef`
* [x] light bindings here with `trace-tef`.
(Can be opened in https://ui.perfetto.dev)
* [ ] richer bindings with [ocaml-catapult](https://github.com/imandra-ai/catapult),
with multi-process backends, etc.
- [x] Tracy (see [ocaml-tracy](https://github.com/imandra-ai/ocaml-tracy), more specifically `tracy-client.trace`)
Expand Down
4 changes: 2 additions & 2 deletions 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.5)
(version 0.6)

(source
(github c-cube/ocaml-trace))
Expand All @@ -23,7 +23,7 @@

(package
(name ppx_trace)
(synopsis "ppx-based instrumentation for trace")
(synopsis "A ppx-based preprocessor for trace")
(depends
(ocaml (>= 4.12)) ; we use __FUNCTION__
ppxlib
Expand Down
4 changes: 2 additions & 2 deletions ppx_trace.opam
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
version: "0.5"
synopsis: "ppx-based instrumentation for trace"
version: "0.6"
synopsis: "A ppx-based preprocessor for trace"
maintainer: ["Simon Cruanes"]
authors: ["Simon Cruanes"]
license: "MIT"
Expand Down
2 changes: 1 addition & 1 deletion trace-fuchsia.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.5"
version: "0.6"
synopsis:
"A high-performance backend for trace, emitting a Fuchsia trace into a file"
maintainer: ["Simon Cruanes"]
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.5"
version: "0.6"
synopsis:
"A simple backend for trace, emitting Catapult/TEF JSON into a file"
maintainer: ["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.5"
version: "0.6"
synopsis:
"A stub for tracing/observability, agnostic in how data is collected"
maintainer: ["Simon Cruanes"]
Expand Down

0 comments on commit 5c5fdde

Please sign in to comment.