Commit graph

756 commits

Author SHA1 Message Date
Simon Cruanes
43cd3aa230
merge back ptime clock into Clock, make it default
we already depend on ptime in the same package and it's not a big cost.
2026-01-20 00:15:25 -05:00
Simon Cruanes
e2c4a4e680
tracer/logger/metrics_emitter now pair emitter and clock
- clock is needed because timestamps need to be provided now
- explicit types are good anyway
- have at least one helper to emit the signal with optional
tracer/logger/metrics_emitter
- easier logger with `log` and `logf`
2026-01-20 00:15:25 -05:00
Simon Cruanes
ec584b4829
update otel trace 2026-01-20 00:15:25 -05:00
Simon Cruanes
dd2fe8fc52
add opentelemetry_ptime with a clock 2026-01-20 00:15:25 -05:00
Simon Cruanes
092b9a5d2e
have a clock in exporter, pass a mtime in tick 2026-01-20 00:15:25 -05:00
Simon Cruanes
e4063e082e
batch: change ~now to ~mtime 2026-01-20 00:15:25 -05:00
Simon Cruanes
061d2adc68
more dune files 2026-01-20 00:15:25 -05:00
Simon Cruanes
57a915e880
chore: update dune files after implicit_trans_deps=false 2026-01-20 00:15:25 -05:00
Simon Cruanes
34429ea69f
implicit trans deps=false 2026-01-20 00:15:24 -05:00
Simon Cruanes
f2635cce68
move timestamp to util 2026-01-20 00:15:24 -05:00
Simon Cruanes
a3e1fcc362
add clock 2026-01-20 00:15:24 -05:00
Simon Cruanes
a954deb46d
refactor opentelemetry.trace to cleanly separate trace spans from OTEL spans
- trace spans: counter based, local, meant to be handles
- OTEL spans: 8B random blobs, meant to be used in a distributed context
2026-01-20 00:15:24 -05:00
Simon Cruanes
b4c8803931
fix tests after renaming Http_config 2026-01-20 00:15:24 -05:00
Simon Cruanes
03c687b8b3
chore: update makefile to add doc targets 2026-01-20 00:15:24 -05:00
Simon Cruanes
09e4620603
rename Client_config to Http_config
more accurate, really.
2026-01-20 00:15:24 -05:00
Simon Cruanes
dfb0befab0
perf: little optim in opentelemetry_trace 2026-01-20 00:15:24 -05:00
Simon Cruanes
26bc862940
change default batch size for metrics 2026-01-20 00:15:24 -05:00
Simon Cruanes
9e1165918a
compat with older OCaml 2026-01-20 00:15:24 -05:00
Simon Cruanes
0d34f9de4d
feat trace: move to regular Otrace.span for extensions 2026-01-20 00:15:23 -05:00
Simon Cruanes
fe8316d1e8
add picos backend to ambient-context 2026-01-20 00:15:23 -05:00
Simon Cruanes
30175db1ed
feat trace: add set_span_status 2026-01-20 00:15:23 -05:00
Simon Cruanes
a2a7a6cf1e
re-export in dune 2026-01-20 00:15:23 -05:00
Simon Cruanes
18226a63a4
add Span.dummy 2026-01-20 00:15:23 -05:00
Simon Cruanes
30baf3491c
use an interval limiter for the metrics_callbacks 2026-01-20 00:15:23 -05:00
Simon Cruanes
b55598685f
add after_shutdown to ocurl-lwt client 2026-01-20 00:15:23 -05:00
Simon Cruanes
a6bf8171bb
better semantic conventions for self tracing; bounded_queue.high_watermark 2026-01-20 00:15:23 -05:00
Simon Cruanes
ed69b89bf1
more self tracing 2026-01-20 00:15:23 -05:00
Simon Cruanes
212ff39d0b
doc 2026-01-20 00:15:23 -05:00
Simon Cruanes
4e0d59d3f4
add basic test file for ocurl-lwt 2026-01-20 00:15:22 -05:00
Simon Cruanes
e3c4b6fa3a
rename self-tracing metrics 2026-01-20 00:15:22 -05:00
Simon Cruanes
650f4c554f
fix warnings 2026-01-20 00:15:22 -05:00
Simon Cruanes
41e650d461
perf batch: try to improve hotpath
in particular, no need to look at the clock when checking if the batch
is full
2026-01-20 00:15:22 -05:00
Simon Cruanes
370c2a78d0
move Util_mutex to client 2026-01-20 00:15:22 -05:00
Simon Cruanes
a0738e59c2
fix warning 2026-01-20 00:15:22 -05:00
Simon Cruanes
dd29cddb21
detail 2026-01-20 00:15:22 -05:00
Simon Cruanes
fda87007a8
generic consumer: sanity check on queue size 2026-01-20 00:15:22 -05:00
Simon Cruanes
4a61ab44d9
metrics: do not add a default start_time_unix_nano 2026-01-20 00:15:22 -05:00
Simon Cruanes
3eba3df59d
fix emit1: count alloc spans properly; self tracing 2026-01-20 00:15:22 -05:00
Simon Cruanes
bfde7700e8
ocurl: add an ?after_shutdown callback 2026-01-20 00:15:21 -05:00
Simon Cruanes
239d9d5aec
feat exporter: add self_metrics 2026-01-20 00:15:21 -05:00
Simon Cruanes
2d8939ab0a
fix batch: make sure high_watermark>=batch, also put a max on batch size 2026-01-20 00:15:21 -05:00
Simon Cruanes
6c832df3a6
test binary 2026-01-20 00:15:21 -05:00
Simon Cruanes
0986c2aade
emit1: no syscall for sleep=0 2026-01-20 00:15:21 -05:00
Simon Cruanes
03f5741629
emit1: more options 2026-01-20 00:15:21 -05:00
Simon Cruanes
631f7cd01a
refactor, remove debug print 2026-01-20 00:15:21 -05:00
Simon Cruanes
374a67c97a
fix bounded queue: try_pop should drain a closed queue 2026-01-20 00:15:21 -05:00
Simon Cruanes
0eb27174f0
fix batch: default high watermark was wrong 2026-01-20 00:15:21 -05:00
Simon Cruanes
173131ce84
warnings 2026-01-20 00:15:21 -05:00
Simon Cruanes
6151fe0769
basic emit1_stdout test exe 2026-01-20 00:15:20 -05:00
Simon Cruanes
83ba6d2e11
chore: remove dep on saturn 2026-01-20 00:15:20 -05:00