Shon Feder
e66476015b
Move deprecation alerts to valid location
...
As discussed in https://github.com/ocaml/ocaml/issues/14078 ,
alerts (with deprecation alerts as a special case) are not currently
supported as item-attributes on let-bindings. This usage produces
`misplaced-attribute` warnings, such as
```
Warning 53 [misplaced-attribute]: the "deprecated" attribute cannot appear in this context
File "src/core/opentelemetry.ml", line 1229, characters 37-47:
1229 | let add_event = Scope.add_event [@@deprecated "use Scope.add_event"]
^^^^^^^^^^
Warning 53 [misplaced-attribute]: the "deprecated" attribute cannot appear in this context
File "src/core/opentelemetry.ml", line 1231, characters 37-47:
1231 | let add_attrs = Scope.add_attrs [@@deprecated "use Scope.add_attrs"]
^^^^^^^^^^
Warning 53 [misplaced-attribute]: the "deprecated" attribute cannot appear in this context
```
Fortunately, we can still add deprecation alerts to these value by
moving the alert to the pattern, as done here.
2025-06-07 10:56:56 -04:00
Shon Feder
894158339e
Update to support cohttp 6
...
Preparation for Cohttp 6 started in
2022 (https://github.com/mirage/ocaml-cohttp/blob/main/CHANGES.md#v600alpha0-2022-10-24 )
and 6 has been stable and released since Nov of 2024.
See https://github.com/mirage/ocaml-cohttp/blob/main/CHANGES.md#v600-2024-11-21
Removal of the `open Cohttp_lwt` solves deprecation warnings issued by
Cohttp 6, since everything we were using from the open has been moved
into `Cohttp`.
2025-05-25 21:51:49 -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
6a378e49ce
format
2025-04-17 14:59:28 -04:00
Simon Cruanes
9b5f3cd0c3
feat: adapt to trace 0.10
2025-04-17 10:04:16 -04:00
Simon Cruanes
34a4a87fc3
perf: details
2025-04-09 10:00:50 -04:00
Antonin Décimo
b2e62d527e
fix: opentelemetry-client-ocurl: don't block signals on Windows
...
As of OCaml 5.3, the OCaml runtime doesn't support signals on
Windows. Trying to block them with Thread.sigmask will raise:
Thread 5 killed on uncaught exception Invalid_argument("Thread.sigmask not implemented")
Raised by primitive operation at Opentelemetry_client_ocurl.start_bg_thread.run in file "src/client-ocurl/opentelemetry_client_ocurl.ml", line 106, characters 12-49
2025-03-27 09:28:48 -04:00
Simon Cruanes
21de8b1f4b
forgot to update tags
2025-03-19 09:06:57 -04:00
Simon Cruanes
3d3cf8c02c
fix otel-client-ocurl: use ptime timestamps for self metrics
2025-03-14 10:00:54 -04:00
Corentin Leruth
7ef6677dff
add missing sample argument to Traceparent.to_value
2025-03-03 09:32:01 -05:00
Simon Cruanes
66573bd1ac
fix: compat with lwt < 5.7
2025-01-31 16:50:21 -05:00
Simon Cruanes
92613d8526
fix
2025-01-30 20:44:57 -05:00
Corentin Leruth
4f9247d6d0
support sampled flag
2025-01-30 20:32:48 -05:00
Simon Cruanes
1848b02c0f
add optional args to Span_link.of_span_ctx
2025-01-14 09:32:11 -05:00
Simon Cruanes
3f41c7e450
feat otel.trace: extension points for links, record_exn, kind
2025-01-14 09:32:11 -05:00
Simon Cruanes
c71caa93be
feat otel: add Span_kind.t, add {kind,set_kind} to Scope
2025-01-14 09:32:11 -05:00
Simon Cruanes
fdee7fe2dd
fix otel.trace: set scope for explicit spans
2024-10-25 10:44:32 -04:00
Corentin Leruth
5aa5c5ed0a
expose Span_status types
2024-10-24 10:48:10 -04:00
Simon Cruanes
9813ec6afc
Merge pull request #76 from imandra-ai/simon/fix-41
...
fix: wait for cleanup in cohttp client
2024-10-21 22:57:27 -04:00
Simon Cruanes
3a22a932f4
Merge pull request #75 from tatchi/add-set-span-status
...
add Scope.set_span_status
2024-10-21 12:01:01 -04:00
Simon Cruanes
865b446829
Update src/core/opentelemetry.ml
2024-10-21 10:40:46 -04:00
Corentin Leruth
53c1ddba8c
re-add code to set span status based on scope
2024-10-18 11:35:16 +02:00
Corentin Leruth
acc9cb3abb
move comments to signature
2024-10-18 11:29:11 +02:00
Corentin Leruth
1a78802c20
do not use deprecated functions
2024-10-18 11:26:57 +02:00
Corentin Leruth
6a1f1eb06b
move span status to item_list
2024-10-18 11:22:43 +02: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
a44c5dc33a
in remove_backend, call tick() then cleanup() on it
2024-10-17 13:45:28 -04:00
Simon Cruanes
97030757c1
feat: allow to remove backend
...
close #70
2024-10-17 13:45:28 -04:00
Corentin Leruth
3264b3c2ca
add Scope.set_span_status
2024-10-17 18:18:32 +02:00
Simon Cruanes
041d05eb9f
fix otel.trace: record exception in with_span
...
close #71
2024-10-17 11:06:34 -04:00
Nicola Mometto
f8079a13ea
chore: update warnings
2024-10-17 14:20:20 +01:00
Corentin Leruth
ac1a27eb89
reduce memory usage of Scope.t
2024-10-10 21:22:16 +02:00
Simon Cruanes
036c108a27
Merge pull request #66 from tatchi/add-links
...
add links to scope
2024-10-07 11:10:06 -04:00
Corentin Leruth
41f1f43470
add Scope.make
2024-10-07 16:37:01 +02:00
Corentin Leruth
b3747cfc8e
add links to scope
2024-10-07 15:07:05 +02:00
Simon Cruanes
076f39b1be
remove optional dep on rcontext
2024-10-04 21:02:39 -04:00
Simon Cruanes
420ad5484e
feat otel.trace: use "otel.error" to influence a span status
2024-09-30 14:14:41 -04:00
Simon Cruanes
461811a2cb
feat trace: set status of a span based on exception.message
2024-09-30 12:40:17 -04:00
Simon Cruanes
60a0b843e6
feat: update and fix opentelemetry.trace
2024-09-30 12:34:16 -04:00
Corentin Leruth
ce23facec1
use reraise
2024-09-24 21:23:51 +02:00
Corentin Leruth
00d46841e4
add record_exception
2024-09-24 09:35:26 +02:00
Simon Cruanes
7629e419c8
format
2024-09-20 09:22:13 -04:00
ajbt200128
242d304639
Add events to spans created
2024-09-20 08:24:11 -04:00
Corentin Leruth
d6d36ee73d
add url to error log
2024-09-20 08:16:37 -04:00
Simon Cruanes
a9971e4d41
eio local storage
2024-09-06 09:48:06 -04:00