Commit graph

23 commits

Author SHA1 Message Date
Simon Cruanes
e50175298b
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-07-31 23:54:49 -04:00
Simon Cruanes
f414acbfb4
doc 2023-07-31 23:13:57 -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
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
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
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
8625a33d6b
use better float printer for counters 2023-06-09 23:08:16 -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
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
b6db37fab0
add thread/process name setting 2023-06-09 16:07:49 -04:00
Simon Cruanes
06b7bf28b7
remove domain stub entirely 2023-06-09 09:55:42 -04:00
Simon Cruanes
261874bfa8
add optional metadata to messages and spans 2023-06-09 09:54:19 -04:00
Simon Cruanes
1fed3eba8e
change API 2023-06-09 09:34:31 -04:00
Simon Cruanes
718cbf120f
fix trace-tef: cleanup 2023-06-09 08:10:35 -04:00
Simon Cruanes
c58810f4e8
fix build error; make tests deterministic 2023-06-08 23:47:52 -04:00
Simon Cruanes
0707d932bc
perf: make with_ inlinable in case there is no collector 2023-06-08 23:17:39 -04:00
Simon Cruanes
07645ffa1a
add trace-tef, a simple backend 2023-06-08 22:31:32 -04:00
Simon Cruanes
39a14bbede
re-export Collector module 2023-06-08 21:30:09 -04:00
Simon Cruanes
68bcc7c9e2
initial commit 2023-06-08 21:25:34 -04:00