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
Simon Cruanes
ddc9cce5af
prepare for 0.2
2023-06-15 13:16:39 -04:00
Simon Cruanes
088f2a5e7f
trace-tef: additional argument to with_setup; env for "stdout"/"stderr"
2023-06-12 13:30:06 -04:00
Simon Cruanes
ee2e5dd651
refactor: avoid the cursed stdlib Trace module by adding trace.core
...
this way, we can actually use only `trace.core` when we also expect to
use compiler-libs.toplevel (which contains a naked `Trace` module, which
would cause .cmi collisions). The library `trace` still exists, and just
forwards to `trace.core`.
2023-06-12 13:12:41 -04:00
Simon Cruanes
c7a25a1618
more docs
2023-06-12 11:06:45 -04:00
Simon Cruanes
61f064a997
test: add more events
2023-06-10 19:31:39 -04:00
Simon Cruanes
1886ee737e
perf(trace-tef): improve behavior of collector under contention
...
writers still do one lock+unlock per event, but the collector can read
multiple events at once using Queue.transfer.
2023-06-10 19:30:24 -04:00
Simon Cruanes
261f143dd2
prepare for 0.1
2023-06-09 23:19:18 -04:00
Simon Cruanes
8625a33d6b
use better float printer for counters
2023-06-09 23:08:16 -04:00
Simon Cruanes
3db8f73dcb
update test with counters
2023-06-09 23:06:03 -04:00
Simon Cruanes
341f137ebd
add counter_int and counter_float
2023-06-09 23:05:54 -04:00
Simon Cruanes
7958d7bc3b
tef: remove dead code
2023-06-09 22:48:45 -04:00
Simon Cruanes
29fc25e598
readme
2023-06-09 19:48:57 -04:00
Simon Cruanes
1735abeb8b
api change: message does not take location
...
even tracy doesn't have that. Otoh a message should have an optional
span for OTEL.
2023-06-09 16:53:53 -04:00
Simon Cruanes
d913dbc1b1
makefile: fix
2023-06-09 16:53:49 -04:00
Simon Cruanes
89dac20da8
update test
2023-06-09 16:08:50 -04:00
Simon Cruanes
fdb0f5c4e9
makefile: change default watch target
2023-06-09 16:08:21 -04:00
Simon Cruanes
b6db37fab0
add thread/process name setting
2023-06-09 16:07:49 -04:00
Simon Cruanes
da3388dbf9
readme
2023-06-09 10:24:05 -04:00
Simon Cruanes
b6322d0604
fix test: do not use feature not present in 4.08
2023-06-09 10:23:43 -04:00