Commit graph

86 commits

Author SHA1 Message Date
Simon Cruanes
3c14f7d9f0
make benchmark more ruthless 2023-12-05 14:50:34 -05:00
Simon Cruanes
0e198c8059 compat < 5.0 2023-11-28 14:31:16 -05:00
Simon Cruanes
67bc11b4d3 fix for 4.08 2023-11-28 14:31:16 -05:00
Simon Cruanes
544892df42 chore: add missing dep on atomic 2023-11-28 14:31:16 -05:00
Simon Cruanes
c82fb362e8 trace-tef: add Mpsc_queue, adapted from picos; use it in trace_tef 2023-11-28 14:31:16 -05:00
Simon Cruanes
73ead3e369 gitignore 2023-11-28 14:31:16 -05:00
Simon Cruanes
e20028e3f9 add basic benchmark to exercize trace-tef 2023-11-28 14:31:16 -05:00
Simon Cruanes
f3ae3397de
fix docs 2023-10-11 13:29:37 -04:00
Simon Cruanes
4624d1800c
prepare for 0.4 2023-09-20 09:26:20 -04:00
Simon Cruanes
0135a613a9 add ?data to counter_int and counter_float
this makes sense to add metadata in, say, opentelemetry
2023-09-16 21:29:01 -04:00
Simon Cruanes
ba9d3d3d20 small refactor 2023-09-15 10:01:20 -04:00
Simon Cruanes
572f2848c8 add float to user data 2023-09-15 10:01:20 -04:00
Simon Cruanes
431811c995
rename add_data_to_current_span; give it span explicitly 2023-09-13 14:43:16 -04:00
Simon Cruanes
e0fe99f500
rename add_data to add_data_to_current_span 2023-09-06 09:50:54 -04:00
Simon Cruanes
bffa5ad209
Merge pull request #11 from c-cube/wip-add-data-dyn
add `add_data_to_span` and `add_data_to_explicit_span`
2023-09-01 09:04:55 -04:00
Simon Cruanes
c9b6a60a6f
test: update output, now fixed 2023-08-30 20:24:19 -04:00
Simon Cruanes
4fc81d4ca2
tef: carry additional data for manual spans in the explicit_span's map
the span opening has been emitted already, so we'll emit the metadata at
exit time. We don't need side storage since we already have a hmap.
2023-08-30 20:24:17 -04:00
Simon Cruanes
567386908e
make explicit_span.meta mutable 2023-08-30 20:23:54 -04:00
Simon Cruanes
5d04850997
update doc
Co-authored-by: ELLIOTTCABLE <github.com@from.ec>
2023-08-30 20:23:54 -04:00
Simon Cruanes
4306a635f3
Update src/core/collector.ml
Co-authored-by: ELLIOTTCABLE <github.com@from.ec>
2023-08-30 20:23:53 -04:00
Simon Cruanes
e34d6dade3
update test 2023-08-30 20:23:53 -04:00
Simon Cruanes
8a4309b95e
adapt trace-tef to handle adding data after creating span 2023-08-30 20:23:52 -04:00
Simon Cruanes
4137985d69
make add_data implicit (no span argument) 2023-08-30 20:23:52 -04:00
Simon Cruanes
83baf45207
update test 2023-08-30 20:23:51 -04:00
Simon Cruanes
c683f6331b
add add_data_to_span and add_data_to_explicit_span 2023-08-30 20:23:51 -04:00
Simon Cruanes
20e2bf2f87
tef: docs and small refactor 2023-08-30 08:31:50 -04:00
Simon Cruanes
b467678040
feat tef: write to trace.json if TRACE is either 1 or true 2023-08-30 08:31:49 -04:00
Corentin Leruth
fc5b243df5 b_queue: use broadcast instead of signal 2023-08-29 22:37:54 -04:00
Corentin Leruth
efafd34a9e b_queue: signal only if queue was empty 2023-08-23 20:42:16 -04:00
Simon Cruanes
96fb44e6bb
trace-tef: emit function name, if provided, as a metadata key/value pair
the key is "function". It is visible when selecting the span, typically.
2023-08-19 17:13:56 -04:00
Simon Cruanes
b57f878072
change warnings 2023-08-19 17:13:52 -04:00
Simon Cruanes
e194972613
re-export trace.core in trace 2023-08-19 16:53:06 -04:00
Simon Cruanes
91c9da3b66
prepare for 0.3 2023-08-09 00:29:24 -04:00
Simon Cruanes
82aa762de3 update test 2023-08-09 00:26:21 -04:00
Simon Cruanes
0eb6a84982 feat: add ?flavor argument to manual spans. 2023-08-09 00:26:21 -04:00
Simon Cruanes
dc4037a14e Update src/core/trace_core.mli
Co-authored-by: ELLIOTTCABLE <github.com@from.ec>
2023-08-09 00:26:21 -04:00
Simon Cruanes
1b5e827d65 fix inconsistency 2023-08-09 00:26:21 -04:00
Simon Cruanes
50b4691ab6 rename explicit span API 2023-08-09 00:26:21 -04:00
Simon Cruanes
4ca766166f Update src/core/trace_core.mli
Co-authored-by: Corentin Leruth <corentin.leruth@gmail.com>
2023-08-09 00:26:21 -04:00
Simon Cruanes
a09a4fc69a refactor collector API as well.
After long discussions with @ELLIOTTCABLE, the collector should only
provide a `with_`-like function for regular spans. This allows
each concurrency library to use its native mechanism for local storage,
which is almost always based on such a scope function.
2023-08-09 00:26:21 -04:00
Simon Cruanes
deab399e93 update test 2023-08-09 00:26:21 -04:00
Simon Cruanes
b44e2f2923 Add explicit spans, for async tracing.
These spans require the user to pass the surrounding span, if any, when
entering a new span. They use the information inside (which is collector
specific) to track what asynchronous task is currently being executed.

Wrappers around `trace`, specific to an async library (e.g. Eio, lwt,
Async, etc.) can then smooth this over by providing a `with_async_span`
construct that uses some implicit contextual storage to carry the
`surrounding` scope around.
2023-08-09 00:26:21 -04:00
Simon Cruanes
1be267d626 gitignore 2023-08-09 00:26:21 -04:00
Simon Cruanes
ac57085d33 doc 2023-08-09 00:26:21 -04:00
Joseph Price
f8cd53ec89 chore: depend on core in trace-tef
This changes trace-tef to depend on trace-core instead of trace, to
avoid clashing with the toplevel's Trace module when starting utop.
2023-07-30 22:56:49 -04:00
Simon Cruanes
c92a829022
chore: update opam files 2023-07-30 09:28:23 -04:00
Simon Cruanes
9c259742dc
rename to ocaml-trace 2023-07-26 14:18:24 -04:00
Simon Cruanes
69f8447c9a
update readme 2023-07-18 15:59:36 -04:00
Simon Cruanes
c8f88f44ea
details 2023-06-23 15:00:08 -04:00
Simon Cruanes
345dd4a163
feat trace-tef: add a ticker thread to ensure we flush the file regularly 2023-06-23 14:56:05 -04:00