Commit graph

49 commits

Author SHA1 Message Date
Simon Cruanes
b044203b79
update HTTP clients 2026-01-20 00:15:20 -05:00
Simon Cruanes
0bf561b586
update client libraries, remove stop:bool atomic in favor of switches 2026-01-20 00:15:20 -05:00
Simon Cruanes
f1ee6141a5
refactor ocurl, ocurl_lwt, cohttp_lwt clients to use generic consumer 2026-01-20 00:15:17 -05:00
Simon Cruanes
2f5646ab4f
config fix 2026-01-20 00:15:16 -05:00
Simon Cruanes
4f218b31ef
mor efixes 2026-01-20 00:15:14 -05:00
Simon Cruanes
a33c57a46e
wip: refactor 2026-01-20 00:15:11 -05:00
Simon Cruanes
8290b9bd81
fix warnings 2025-12-01 20:32:04 -05:00
Simon Cruanes
883d1bc4e5
Merge pull request #110 from tatchi/since-012
add correct release version in comment
2025-11-10 09:34:08 -05:00
Corentin Leruth
78dfbffe13 fix comment 2025-11-10 09:20:38 -05:00
Corentin Leruth
950d5922a1 add correct release version in comment 2025-11-08 12:49:52 +01:00
Simon Cruanes
b2ef68536d
feat cohttp: set 'accept' header as well 2025-09-15 12:25:04 -04:00
Shon Feder
39920ed109
Fix Signal encoder name choice
Don't know why I didn't opt for this clearer name originally.
2025-07-08 21:28:55 -04:00
Shon Feder
ca31707395
Factor batching logic out of the cohttp-lwt client
This will allow resuing the batching logic in the Eio client.
As a followup, we should refactor the ocurl client to use the same
batcher.
2025-06-27 21:48:55 -04:00
Shon Feder
8f7d74f591
Allow optional reuse of encoder state
This allows clien implementors to micromanage the state of the protobuf
`encoder` if they want, or to just let the library handle allocation and
garbage collection of encoder states when that level of resource
managment is not required.
2025-06-20 16:19:55 -04:00
Shon Feder
52377b0a03
Factor out signal encoding logic 2025-06-16 23:34:45 -04:00
Shon Feder
5c0691439e
Remove unneeded indirection
The `tick_common` function is only used once.
Removing the indirection also lets us see that we were calling
`sample_gc_metrics_if_needed` twice in a row on each tick.
2025-06-15 19:31:02 -04:00
Shon Feder
8511f547d7
Fix name of library
Matches the convention in /src/trace/dune and prevents dependency on
the library from polluting the global namespace of a component with the
generic `Client` module.
2025-06-10 18:11:30 -04:00
Shon Feder
ec0efec681
Rename Env sig to ENV 2025-06-10 17:47:56 -04:00
Shon Feder
d62f680fc3
Refactor client configuration
Enabling sharing all common configuration logic
2025-06-10 00:40:13 -04:00
Simon Cruanes
51af3a4105
format 2025-05-05 14:41:20 -04:00
Simon Cruanes
26691eca20
remove obsolete comment 2025-05-05 14:36:31 -04:00
Simon Cruanes
5788492946
breaking: change Collector.cleanup so it takes a callback
this callback can be used to resolve a Lwt future, for example, to make
sure we indeed wait for the cleanup to be done before exiting.
2025-04-17 16:09:14 -04:00
Simon Cruanes
21de8b1f4b
forgot to update tags 2025-03-19 09:06:57 -04:00
Simon Cruanes
66573bd1ac
fix: compat with lwt < 5.7 2025-01-31 16:50:21 -05:00
Simon Cruanes
55977b13d8
fix: wait for cleanup in cohttp client
in `Opentelemetry_client_cohttp_lwt.with_setup` we should now wait for
the cleanup to be done, by sneaking in a `unit Lwt.u` that is only
resolved after the cleanup is done.

close #41
2024-10-17 15:06:45 -04:00
Simon Cruanes
e789ecf3da cleanup 2024-10-17 13:45:28 -04:00
Simon Cruanes
308e0304e3 simplify 2024-10-17 13:45:28 -04:00
Simon Cruanes
424a82c8a5 in backends, call tick() before cleaning up
this helps flushing signals that are being batched.

close #69
2024-10-17 13:45:28 -04:00
Simon Cruanes
7629e419c8
format 2024-09-20 09:22:13 -04:00
Corentin Leruth
e73ea7e6ad make urls from env take precedence 2024-08-09 08:17:08 +02:00
Corentin Leruth
f0dd5a7a35 remove unused config parameter 2024-08-09 08:04:08 +02:00
Corentin Leruth
3daa0d8762 port changes to cohttp client 2024-08-05 10:00:52 +02:00
Simon Cruanes
bd8b483e81
feat: use AList for tick callbacks; emit GC events on tick
it's cleaner to emit GC events on ticks rather than on GC,
because it avoids both spamming if the GC is very active, and
emitting nothing when there are few allocations.
2023-12-20 15:46:39 -05:00
Simon Cruanes
f6afc3df1c
use ocaml-protoc 3.0.1 for codegen 2023-12-14 20:49:11 -05:00
Elliott Cable
9a834b39f7 dune fmt 2023-09-20 15:15:58 +00:00
Elliott Cable
ed90772a57 Merge branch 'master' into configurable-scope-storage
* master:
  fix ocurl: have ticker thread stop when work queue is closed
  fix get_url test to take config.url into account
  add get_url test with explicit config url
  chore: makefile
  update generated code
  opentelemetry: in Trace, change default span kind
  chore: migrate to OTEL proto files 1.0
  CI: run on 5.0; run on every branch push
  remove use of String.ends_with for compat with 4.08
  remove trailing slash from url
  shorter name for the instrumentation library
  use named signals
2023-09-20 14:47:14 +00:00
Elliott Cable
03f6f69bdd collector: Add debug-wrapping backend 2023-09-19 21:35:09 +00:00
Corentin Leruth
a62f1d891a fix get_url test to take config.url into account 2023-09-13 15:18:13 -04:00
Simon Cruanes
063c046933 remove use of String.ends_with for compat with 4.08 2023-08-31 23:44:16 -04:00
Corentin Leruth
883d4bb806 remove trailing slash from url 2023-08-31 23:44:16 -04:00
Simon Cruanes
67f4f5b9cc
Merge pull request #31 from ELLIOTTCABLE/try-lwt-over-lwt-catch
Use try%lwt over Lwt.catch
2023-06-23 14:20:06 -04:00
Simon Cruanes
8e1a69d886
enable warnings and fix them 2023-06-15 22:18:20 -04:00
Elliott Cable
3e46458499 (style lwt ppx dep) Use try%lwt over Lwt.catch 2023-06-13 22:50:52 +00:00
Simon Cruanes
bc3ecbc30c
gc metrics every 20s 2022-11-30 17:08:08 -05:00
Simon Cruanes
dbd08b7e0a
timeout-based GC metrics collection 2022-11-30 17:05:22 -05:00
Simon Cruanes
f436a1b109
fix(cohttp-lwt-client): do not override config url 2022-11-09 11:53:14 -05:00
Anurag Soni
7973cee9c0 Allow spaces in header values 2022-11-04 22:43:42 -04:00
Simon Cruanes
f95baa533f
try to fix compilation error 2022-10-03 12:20:59 -04:00
Simon Cruanes
c3f5b36e36
feat: add opentelemetry-client-cohttp-lwt library 2022-10-03 12:20:59 -04:00