mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-07 18:37:56 -05:00
fix: no List.find_map in ocaml 4.08
This commit is contained in:
parent
1cd536cb8e
commit
efbb3469c6
1 changed files with 6 additions and 6 deletions
|
|
@ -228,12 +228,12 @@ module Globals = struct
|
||||||
with _ -> []
|
with _ -> []
|
||||||
|
|
||||||
let get_global_attr_ key =
|
let get_global_attr_ key =
|
||||||
global_attributes
|
let attr =
|
||||||
|> List.find_map (fun kv ->
|
global_attributes |> List.find_opt (fun kv -> kv.key = key)
|
||||||
if kv.key = key then
|
in
|
||||||
match kv.value with Some (String_value v) -> Some v | _ -> None
|
match attr with
|
||||||
else None)
|
| Some kv -> (match kv.value with Some (String_value v) -> Some v | _ -> None)
|
||||||
|
| _ -> None
|
||||||
|
|
||||||
(** Main service name metadata *)
|
(** Main service name metadata *)
|
||||||
let service_name =
|
let service_name =
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue