Skip to content

Commit

Permalink
WIP: try fix for the ocaml-ci
Browse files Browse the repository at this point in the history
- `String.starts_with` added in 4.13.
- `__FUNCTION__` added in 4.12.
  • Loading branch information
smondet committed Nov 12, 2024
1 parent dc07cd9 commit b4589de
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions web.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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]]

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b4589de

Please sign in to comment.