Commit graph

38 commits

Author SHA1 Message Date
Simon Cruanes
05ef03b39d
Span.record_exception must also set the span status to error 2026-03-05 10:22:57 -05:00
Simon Cruanes
c442f3b818
batch: update n_dropped correctly; also self_debug in Emitter_batch 2026-03-04 13:16:40 -05:00
Simon Cruanes
31190a3606
providers: self debug at installation 2026-03-04 13:11:25 -05:00
Simon Cruanes
4a097759d3
revert to no batching by default in Provider_config 2026-03-03 20:08:10 -05:00
Simon Cruanes
df643c9af6
add self_debug and provider_config 2026-03-03 17:10:19 -05:00
Simon Cruanes
fa14ddf1f8
helpers to emit in *_provider 2026-03-03 15:14:32 -05:00
Simon Cruanes
e3da59dd97
per signal provider, update to trace 0.12 2026-02-27 14:56:21 -05:00
Simon Cruanes
210b7991c9
rework tracer/meter/logger interfaces
- Meter is new, and makes more sense than
Metrics_callbacks/Metrics_emitter
- Instrument in core, with some basic counters, gauges, and histograms,
+ the possibility to do one's own
2026-02-20 12:31:15 -05:00
Simon Cruanes
07070e3d4a emitter: add self_metrics, track batch n_dropped, sampler rate 2026-02-17 20:59:58 -05:00
Simon Cruanes
71bb7d1996 various fixes 2026-02-17 20:59:58 -05:00
Simon Cruanes
a43587f2a6
rename hmap keys with more consistent scheme 2026-02-15 15:35:08 -05:00
Simon Cruanes
69d1d512e3
add missing OTEL env variables
- Rename http_config to exporter_config with deprecated alias
- add OTEL_SDK_DISABLED support (sdk_disabled field)
- add OTEL_EXPORTER_OTLP_PROTOCOL support (Http_protobuf | Http_json)
- add OTEL_LOG_LEVEL support (log_level field replacing debug bool)
- add OTEL_EXPORTER_OTLP_TIMEOUT and per-signal timeout variants
- add per-signal headers
(OTEL_EXPORTER_OTLP_{TRACES,METRICS,LOGS}_HEADERS)
- add OTEL_SERVICE_NAME support

also remove some globals and put most config in `exporter_config.ml`,
which is no longer a private record.
2026-02-12 21:04:28 -05:00
Simon Cruanes
696a5d4b91
tidy up src/lib 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
cdd1289c1d
compat 4.08 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
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
e01a2f773b
use the correct clock in logger/metrics; use ptime_clock as default 2026-01-20 00:15:26 -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
092b9a5d2e
have a clock in exporter, pass a mtime in tick 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
a2a7a6cf1e
re-export in dune 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
239d9d5aec
feat exporter: add self_metrics 2026-01-20 00:15:21 -05:00
Simon Cruanes
3026ad41ad
use Aswitch in main library 2026-01-20 00:15:19 -05:00
Simon Cruanes
61f17fa6ce
better exporter/emitter combinators; better cleanup (now shutdown) 2026-01-20 00:15:19 -05:00
Simon Cruanes
c24dbebbf3
fix metrics_callbacks' API to make it easier 2026-01-20 00:15:18 -05:00
Simon Cruanes
79b75cd79b
remove unused argument for Logger 2026-01-20 00:15:15 -05:00
Simon Cruanes
30d6749815
warning 2026-01-20 00:15:15 -05:00
Simon Cruanes
4f218b31ef
mor efixes 2026-01-20 00:15:14 -05:00
Simon Cruanes
d02d609cf9
feat lib: easily access the main tracer, logger, etc 2026-01-20 00:15:14 -05:00
Simon Cruanes
a0b421dcdc
feat lib/tracer: restore with_ and with_thunk_and_finally !! 2026-01-20 00:15:14 -05:00
Simon Cruanes
9453506d7b
migrate a few more things to lib/ from core/ 2026-01-20 00:15:14 -05:00
Simon Cruanes
c4e8f8c39b
feat lib: dynamic forward to main; improve Main_exporter 2026-01-20 00:15:14 -05:00
Simon Cruanes
cf39d2a699
feat: tracer, logger, etc are regular emitters now 2026-01-20 00:15:13 -05:00
Simon Cruanes
3fdb0eebd5
feat lib: expose Ambient_span 2026-01-20 00:15:13 -05:00
Simon Cruanes
b8228dfe25
split core library into opentelemetry.core and opentelemetry 2026-01-20 00:15:12 -05:00