From b4589de77966897b6e7d45a50f29fe5b489b5c63 Mon Sep 17 00:00:00 2001 From: Sebastien Mondet Date: Tue, 12 Nov 2024 15:25:04 -0500 Subject: [PATCH] WIP: try fix for the `ocaml-ci` - `String.starts_with` added in 4.13. - `__FUNCTION__` added in 4.12. --- web.ml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/web.ml b/web.ml index 0991b32..2fc3035 100644 --- a/web.ml +++ b/web.ml @@ -247,7 +247,7 @@ module Http (IO : IO_TYPE) (Curl_IO : CURL with type 'a t = 'a IO.t) : HTTP with (* Given a list of strings, check pre-existing entry starting with `~name`; and adds the concatenation of `~name` and `~value` if not. *) let add_if_absent ~name ~value strs = match strs with - | Some strs when List.exists (StringLabels.starts_with ~prefix:(name^":")) strs -> strs + | Some strs when List.exists (fun s -> Stre.starts_with s (name^":")) strs -> strs | Some strs -> (String.concat ": " [name; value]) :: strs | None -> [String.concat ": " [name; value]] @@ -301,7 +301,8 @@ module Http (IO : IO_TYPE) (Curl_IO : CURL with type 'a t = 'a IO.t) : HTTP with "url.full", `String url; ] in - let explicit_span = Possibly_otel.enter_manual_span ~__FUNCTION__ ~__FILE__ ~__LINE__ ~data:describe action_name in + let explicit_span = + Possibly_otel.enter_manual_span ~__FUNCTION__:"Web.Http.add_if_absent" ~__FILE__ ~__LINE__ ~data:describe action_name in let headers = match Possibly_otel.Traceparent.get_ambient ~explicit_span () with | None -> headers