Simon Cruanes
0a95e5ff37
test for TLS as ambient-span-provider
2026-02-26 12:33:53 -05:00
Simon Cruanes
e0a705e391
add trace.thread-local-storage optional library
...
a basic ambient span provider.
2026-02-26 09:36:06 -05:00
Simon Cruanes
aaba8d4db3
use current_span when entering spans or sending messages
...
use the current span if no parent/context span is specified.
2026-02-25 14:16:47 -05:00
Simon Cruanes
4e6c69de8c
Merge pull request #44 from ocaml-tracing/simon/proper-scope-in-collector
...
add ambient_span_provider to get cur_span/with_cur_span
2026-02-25 14:10:02 -05:00
Simon Cruanes
d8cdb2bcc2
runtime events collector, + test
2026-02-11 20:39:25 -05:00
Simon Cruanes
e4d4e23530
add {thread,process}_sort_index extension + TEF support
...
https://github.com/google/perfetto/pull/3273/changes#diff-ecec88c33adb7591ee6aa88e29b62ad52ef443611cba5e0f0ecac9b5725afdba
allows user to sort threads/processes.
2026-02-11 20:16:07 -05:00
Simon Cruanes
627164afd0
update next tag
2026-02-10 20:43:09 -05:00
Simon Cruanes
c9cd56d0b5
add enabled to the collector
...
this way we can have collectors that only accept some levels
2026-02-06 13:14:19 -05:00
Simon Cruanes
a4144ff3d1
extensible metric; pass level around in collector
2026-01-21 21:04:53 -05:00
Simon Cruanes
6f3b487f35
bit of doc
2026-01-20 20:31:27 -05:00
Simon Cruanes
594a101922
remove unused dep on thread-local-storage
2026-01-20 20:18:16 -05:00
Simon Cruanes
44f87bdd6b
trace: remove meta_map, not used anymore
2026-01-17 22:39:25 -05:00
Simon Cruanes
ea59d09635
track spans: sort resulting list of unclosed spans
2026-01-17 21:13:49 -05:00
Simon Cruanes
eb4abf2966
compat fix
2026-01-17 21:06:48 -05:00
Simon Cruanes
f88cd7651c
trace-tef: ?debug option to track spans
2026-01-17 20:54:07 -05:00
Simon Cruanes
254c7e0af9
better, simpler, no fuss trace.debug
...
we can track names and allocate span IDs ourselves by just wrapping the
underlying collector's spans.
2026-01-17 20:53:58 -05:00
Simon Cruanes
67b3deb191
add Trace.with_setup_collector
2026-01-17 20:53:12 -05:00
Simon Cruanes
dd432c4586
add trace.debug to find what spans were not closed on exit
2026-01-17 10:42:59 -05:00
Simon Cruanes
e98c11c9e0
remove dead code and on_tracing_error
2026-01-17 10:42:45 -05:00
Simon Cruanes
481b5a10b2
remove subscriber entirely
2026-01-16 19:50:50 -05:00
Simon Cruanes
f714482fe4
address warnings
2026-01-15 20:53:15 -05:00
Simon Cruanes
22d91d4f40
rewrite trace-fuchsia to work with new collector
2026-01-15 20:43:05 -05:00
Simon Cruanes
e2a942fedc
fix tef-tldrs
2026-01-15 20:42:51 -05:00
Simon Cruanes
dc37f68993
rewrite trace-tef so it returns the new collector
2026-01-15 20:42:45 -05:00
Simon Cruanes
7b0197e6c2
trace.util: add Unix_util and Mock_
2026-01-15 20:42:29 -05:00
Simon Cruanes
85ef7f4587
trace.simple: a basic span type as illustration
2026-01-15 20:42:06 -05:00
Simon Cruanes
64936441ef
trace.util: add the thread and time utils, add multi_collector, add span_id64 and trace_id64
...
utils for collectors in general really.
2026-01-15 17:20:55 -05:00
Simon Cruanes
fc2fc49e94
remove subscriber library
...
it's basically similar to Trace_core.Collector at this point.
2026-01-15 17:20:17 -05:00
Simon Cruanes
66816040aa
core: remove current_span from collector
...
probably orthogonal, collectors can provide this optionally via
ambient-context if desired. doesn't need to be in the Trace_core
collector itself.
2026-01-15 17:19:49 -05:00
Simon Cruanes
2a866e60f8
fix fuchsia and tef backends to use trace_id
2026-01-14 22:30:00 -05:00
Simon Cruanes
5b83834af5
subscriber: restore trace_id
...
we need it for async backends, clearly
2026-01-14 22:29:46 -05:00
Simon Cruanes
c89a031e43
core: enter_span takes an optional flavor
...
it's a core extension, it should be easy to use
2026-01-14 22:29:32 -05:00
Simon Cruanes
2cfb3c67fa
port fuchsia to new subscriber
2026-01-14 22:09:33 -05:00
Simon Cruanes
7389ca5b45
fix warning
2026-01-14 22:09:25 -05:00
Simon Cruanes
322e1d0f44
subscriber: make ~new_span_id mandatory
...
too easy to forget otherwise
2026-01-14 22:09:05 -05:00
Simon Cruanes
7a392e54d1
trace-tef: use new subscriber, no more global state
2026-01-14 21:56:09 -05:00
Simon Cruanes
a1837e402e
trace.subscriber: define custom span, simplify subscriber callbacks
...
- custom span carries around all the required data, including mutable
args
- no more manual enter/exit callbacks
- use record for callbacks
- no more big Span_tbl
2026-01-14 21:56:09 -05:00
Simon Cruanes
40b44349e7
core: add on_init callback to collector
2026-01-14 21:56:09 -05:00
Simon Cruanes
8e2bb5bc83
remove event for now
2026-01-14 21:27:33 -05:00
Simon Cruanes
5018a9ead7
refactor core library
...
much cleaner now, and simpler.
- `span` is an open sum type, so it can carry as much info as we want
from enter to exit. This means most collectors shouldn't even need a
global table for spans!
- merge manual spans and spans. It's just spans now. Keep old
Trace_core.xxx_manual_xxx functions but deprecate them
- add `extension_parameter` to carry additional info to collector (eg
OTEL span kind, TEF sync/async, maybe span links, etc)
- make the collector into a record of callbacks + a state, for
efficiency (but also to make it easier to extend in the future with
callbacks that have a default implementation
)
2026-01-14 20:29:33 -05:00
Vincent Bernardoff
1c9a869148
ppx: call Stdlib.Printexc
...
This is because some libraries, i.e. Janestreet Core, override the
Printexc module.
2026-01-10 08:20:55 -05:00
Simon Cruanes
0947d2d523
better error message
2025-12-09 12:24:52 -05:00
Simon Cruanes
b3da5bc41e
deal with Pexp_function
2025-12-09 12:24:48 -05:00
Simon Cruanes
89eecf7ba3
breaking: use poly variants for user_data/span_flavor in subscriber
...
no need to do redundant conversions.
2025-12-04 12:39:03 -05:00
Simon Cruanes
aeb2aff3b7
breaking: require subscribers to provide mk_span/mk_trace_id
...
we want control over this!
2025-12-04 12:31:14 -05:00
Simon Cruanes
acae4ff88d
doc
2025-11-01 22:18:16 -04:00
Simon Cruanes
0c275b3aab
use at_exit in trace_tef/tldrs
2025-09-15 09:11:09 -04:00
Simon Cruanes
a81785f8c0
fix fuchsia: bound check
2025-07-26 01:20:40 -04:00
Simon Cruanes
d9cd7621f5
prepare for 0.10
2025-05-27 09:58:19 -04:00
Simon Cruanes
cd5785d938
format
2025-05-27 09:54:58 -04:00