Simon Cruanes
21e799ae61
Fix ezcurl 0.3 compatibility issue
...
The ezcurl library changed its client type from Curl.t to Ezcurl_core.t
(an unboxed record type) in version 0.3. Updated both sync and lwt
implementations to use the correct type and module functions.
2026-02-08 07:03:43 +00:00
Simon Cruanes
1ebd474423
fix: critical bugs found in code review
...
Bug #1 : Fix worker count logic in generic_consumer
- Was: min 2 (max 500 n_workers) - always created 2 workers
- Now: max 2 (min 500 n_workers) - properly clamps between 2-500
- Impact: Worker configuration was completely ignored
Bug #2 : Handle missing dot in __FUNCTION__ name
- Added exception handling for String.rindex in trace span creation
- Prevents crash when tracing top-level or non-module functions
- Uses option type for module_path when no dot is present
- Scoped try/catch to only parsing logic
2026-02-08 06:16:05 +00:00
Simon Cruanes
c29ac75a82
opentelemetry.trace: expose sum and hist metrics
2026-01-21 22:15:23 -05:00
Simon Cruanes
4183254546
update trace, fix opentelemetry.trace
2026-01-21 22:00:08 -05:00
Simon Cruanes
0c119c3eff
details
2026-01-20 00:15:31 -05:00
Simon Cruanes
26e70ed1af
refactor trace: adapt to newer trace 0.99
...
no more global state 🥳
2026-01-20 00:15:31 -05:00
Simon Cruanes
96aef5e021
use a separate ambient-context library
2026-01-20 00:15:31 -05:00
Simon Cruanes
610244aad4
doc
2026-01-20 00:15:30 -05:00
Simon Cruanes
696a5d4b91
tidy up src/lib
2026-01-20 00:15:30 -05:00
Simon Cruanes
f31062a602
rename batching modules
2026-01-20 00:15:30 -05:00
Simon Cruanes
31aadebfd6
typo
2026-01-20 00:15:30 -05:00
Simon Cruanes
f208a87eb8
remove Rpool, unused
2026-01-20 00:15:30 -05:00
Simon Cruanes
4f6334dac0
add Emitter_sample
2026-01-20 00:15:30 -05:00
Simon Cruanes
843d10dae1
detail
2026-01-20 00:15:30 -05:00
Simon Cruanes
d2d5b33751
add Emitter_limit_interval
2026-01-20 00:15:30 -05:00
Simon Cruanes
3ba0523227
details on Interval_limiter
2026-01-20 00:15:29 -05:00
Simon Cruanes
008ae6ddfd
add Emitter_add_batching to client library
...
fronting an emitter with a batch belongs in its own module
2026-01-20 00:15:29 -05:00
Simon Cruanes
07d8357cfb
docs
2026-01-20 00:15:29 -05:00
Simon Cruanes
513aafe6e8
span: carry flags over to span_link
2026-01-20 00:15:29 -05:00
Simon Cruanes
2d6ec5c0f6
remove temporary code in ambient-context
2026-01-20 00:15:29 -05:00
Simon Cruanes
cdd1289c1d
compat 4.08
2026-01-20 00:15:29 -05:00
Simon Cruanes
2d19ae2c46
compat with 4.08
2026-01-20 00:15:29 -05:00
Simon Cruanes
ae92077389
more docs
2026-01-20 00:15:29 -05:00
Simon Cruanes
5622d81ae7
test: change port for test_logs_e2e
...
otherwise sometimes it clashes with the ocurl client test
2026-01-20 00:15:28 -05:00
Simon Cruanes
d9362ae788
feat: add runtime/otel-specific name and version modifiable
...
this way we can mock them in tests, but we can also change the name
"ocaml-otel" to something else, e.g. if we have specific conventions.
2026-01-20 00:15:28 -05:00
Simon Cruanes
dc21341d92
try to fix compat with versions of cohttp
...
it seems like now IO is a required component of Cohttp_lwt.S.Client, so
now we should include parameter `C` so that it just contains whatever
the client has, minus the functions we change.
2026-01-20 00:15:28 -05:00
Simon Cruanes
581590abcc
fix build
2026-01-20 00:15:28 -05:00
Simon Cruanes
a2cee3d397
fix
2026-01-20 00:15:28 -05:00
Simon Cruanes
ca6482085d
try to fix CI
2026-01-20 00:15:28 -05:00
Simon Cruanes
f5a13a1248
debug
2026-01-20 00:15:28 -05:00
Simon Cruanes
b4b864a0b6
fix otel-lwt: logic for tracer.with_ was invalid
...
sometimes spans would be dropped!
2026-01-20 00:15:27 -05:00
Simon Cruanes
3b6e239c17
debug
2026-01-20 00:15:27 -05:00
Simon Cruanes
95e8c78ff8
merge any_signal/signal into resource_signal, dedup
...
we had duplication there! my bad.
2026-01-20 00:15:27 -05:00
Simon Cruanes
3dfbd14508
doc
2026-01-20 00:15:27 -05:00
Simon Cruanes
bf7eaa97bd
setup ambient context in lwt/eio client setups
2026-01-20 00:15:27 -05:00
Simon Cruanes
942a56c879
use mutex again to protect rand_bytes state
...
shard over 8 distinct random generators, though.
2026-01-20 00:15:26 -05:00
Simon Cruanes
e01a2f773b
use the correct clock in logger/metrics; use ptime_clock as default
2026-01-20 00:15:26 -05:00
Simon Cruanes
46960e2021
otel-cohttp-lwt: simplify cleanup
2026-01-20 00:15:26 -05:00
Simon Cruanes
c9f5a27b22
test binaries: updates
2026-01-20 00:15:26 -05:00
Simon Cruanes
e4177c2843
client: split opentelemetry-client.sync off of main client library
...
that's the place for the synchronous primitives.
2026-01-20 00:15:26 -05:00
Simon Cruanes
dc99897e87
improvements in clients
...
after all the refactoring
2026-01-20 00:15:26 -05:00
Simon Cruanes
3c08842e2d
fixes and cleanup in cohttp-eio client
2026-01-20 00:15:26 -05:00
Simon Cruanes
05ad0421db
timestamp_ns.pp_debug: use full RFC3339 to print timestamps
...
it's easier to copy/paste or post-process, it's still very readable, and
you can see the microseconds.
2026-01-20 00:15:26 -05:00
Simon Cruanes
14cd25d289
fix in otel-lwt related to termination
...
Main_exporter.remove needs to actually shutdown the exporter, not just
create a promise that resolves when it's shutdown another way
2026-01-20 00:15:26 -05:00
Simon Cruanes
bef4bd88b2
use Clock.ptime_clock where it makes sense
2026-01-20 00:15:25 -05:00
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