feat: relax type for Trace.with_ so it's covariant in attrs

This commit is contained in:
Simon Cruanes 2022-03-28 15:00:16 -04:00
parent 46487f3997
commit 8f2a666a70
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4

View file

@ -234,7 +234,8 @@ module Globals = struct
List.rev_append (List.filter not_redundant global_attributes) into
end
type key_value = string * [`Int of int | `String of string | `Bool of bool | `None]
type value = [`Int of int | `String of string | `Bool of bool | `None]
type key_value = string * value
(**/**)
let _conv_value =
@ -462,7 +463,7 @@ module Trace = struct
(** Sync span guard *)
let with_
?trace_state ?service_name ?(attrs = [])
?trace_state ?service_name ?(attrs: (string*[<value]) list = [])
?kind ?trace_id ?parent ?scope ?links
name (f: scope -> 'a) : 'a =
let trace_id =