mirror of
https://github.com/ocaml-tracing/ocaml-trace.git
synced 2026-03-07 18:37:56 -05:00
prepare for 0.6
This commit is contained in:
parent
e708791725
commit
659ce2e403
7 changed files with 24 additions and 12 deletions
10
CHANGES.md
10
CHANGES.md
|
|
@ -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
|
# 0.5
|
||||||
|
|
||||||
- perf: reduce overhead in trace-tef
|
- perf: reduce overhead in trace-tef
|
||||||
|
|
|
||||||
12
README.md
12
README.md
|
|
@ -6,7 +6,7 @@
|
||||||
This small library provides basic types that can be used to instrument
|
This small library provides basic types that can be used to instrument
|
||||||
a library or application, either by hand or via a ppx.
|
a library or application, either by hand or via a ppx.
|
||||||
|
|
||||||
### Features
|
## Features
|
||||||
|
|
||||||
- [x] spans
|
- [x] spans
|
||||||
- [x] messages
|
- [x] messages
|
||||||
|
|
@ -14,7 +14,7 @@ a library or application, either by hand or via a ppx.
|
||||||
- [ ] other metrics?
|
- [ ] other metrics?
|
||||||
- [x] ppx to help instrumentation
|
- [x] ppx to help instrumentation
|
||||||
|
|
||||||
### Usage
|
## Usage
|
||||||
|
|
||||||
To instrument your code, you can simply add `trace` to your dune/opam files, and then
|
To instrument your code, you can simply add `trace` to your dune/opam files, and then
|
||||||
write code like such:
|
write code like such:
|
||||||
|
|
@ -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
|
The dependency on `trace.core` is automatically added. You still need to
|
||||||
configure a backend to actually do collection.
|
configure a backend to actually do collection.
|
||||||
|
|
||||||
### Backends
|
## Backends
|
||||||
|
|
||||||
Concrete tracing or observability formats such as:
|
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
|
- 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),
|
* [ ] richer bindings with [ocaml-catapult](https://github.com/imandra-ai/catapult),
|
||||||
with multi-process backends, etc.
|
with multi-process backends, etc.
|
||||||
- [x] Tracy (see [ocaml-tracy](https://github.com/imandra-ai/ocaml-tracy), more specifically `tracy-client.trace`)
|
- [x] Tracy (see [ocaml-tracy](https://github.com/imandra-ai/ocaml-tracy), more specifically `tracy-client.trace`)
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
(name trace)
|
(name trace)
|
||||||
(generate_opam_files true)
|
(generate_opam_files true)
|
||||||
(version 0.5)
|
(version 0.6)
|
||||||
|
|
||||||
(source
|
(source
|
||||||
(github c-cube/ocaml-trace))
|
(github c-cube/ocaml-trace))
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
(package
|
(package
|
||||||
(name ppx_trace)
|
(name ppx_trace)
|
||||||
(synopsis "ppx-based instrumentation for trace")
|
(synopsis "A ppx-based preprocessor for trace")
|
||||||
(depends
|
(depends
|
||||||
(ocaml (>= 4.12)) ; we use __FUNCTION__
|
(ocaml (>= 4.12)) ; we use __FUNCTION__
|
||||||
(ppxlib (>= 0.28))
|
(ppxlib (>= 0.28))
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
# This file is generated by dune, edit dune-project instead
|
# This file is generated by dune, edit dune-project instead
|
||||||
opam-version: "2.0"
|
opam-version: "2.0"
|
||||||
version: "0.5"
|
version: "0.6"
|
||||||
synopsis: "ppx-based instrumentation for trace"
|
synopsis: "A ppx-based preprocessor for trace"
|
||||||
maintainer: ["Simon Cruanes"]
|
maintainer: ["Simon Cruanes"]
|
||||||
authors: ["Simon Cruanes"]
|
authors: ["Simon Cruanes"]
|
||||||
license: "MIT"
|
license: "MIT"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# This file is generated by dune, edit dune-project instead
|
# This file is generated by dune, edit dune-project instead
|
||||||
opam-version: "2.0"
|
opam-version: "2.0"
|
||||||
version: "0.5"
|
version: "0.6"
|
||||||
synopsis:
|
synopsis:
|
||||||
"A high-performance backend for trace, emitting a Fuchsia trace into a file"
|
"A high-performance backend for trace, emitting a Fuchsia trace into a file"
|
||||||
maintainer: ["Simon Cruanes"]
|
maintainer: ["Simon Cruanes"]
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# This file is generated by dune, edit dune-project instead
|
# This file is generated by dune, edit dune-project instead
|
||||||
opam-version: "2.0"
|
opam-version: "2.0"
|
||||||
version: "0.5"
|
version: "0.6"
|
||||||
synopsis:
|
synopsis:
|
||||||
"A simple backend for trace, emitting Catapult/TEF JSON into a file"
|
"A simple backend for trace, emitting Catapult/TEF JSON into a file"
|
||||||
maintainer: ["Simon Cruanes"]
|
maintainer: ["Simon Cruanes"]
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# This file is generated by dune, edit dune-project instead
|
# This file is generated by dune, edit dune-project instead
|
||||||
opam-version: "2.0"
|
opam-version: "2.0"
|
||||||
version: "0.5"
|
version: "0.6"
|
||||||
synopsis:
|
synopsis:
|
||||||
"A stub for tracing/observability, agnostic in how data is collected"
|
"A stub for tracing/observability, agnostic in how data is collected"
|
||||||
maintainer: ["Simon Cruanes"]
|
maintainer: ["Simon Cruanes"]
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue