mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-13 05:56:20 -04:00
Fix client and try%lwt
This commit is contained in:
parent
d096b9de46
commit
099a05498c
1 changed files with 3 additions and 4 deletions
|
|
@ -86,8 +86,7 @@ module Httpc : sig
|
|||
val cleanup : t -> unit
|
||||
end = struct
|
||||
open Opentelemetry.Proto
|
||||
open Lwt.Syntax
|
||||
module Httpc = Cohttp_lwt_unix.Client
|
||||
module Httpc = Cohttp_eio.Client
|
||||
|
||||
type t = unit
|
||||
|
||||
|
|
@ -106,9 +105,9 @@ end = struct
|
|||
Header.(add headers "Content-Type" "application/x-protobuf")
|
||||
in
|
||||
|
||||
let body = Cohttp_lwt.Body.of_string bod in
|
||||
let body = Cohttp_eio.Body.of_string bod in
|
||||
let r =
|
||||
try%lwt
|
||||
try
|
||||
let r = Httpc.post ~headers ~body uri in
|
||||
Ok r
|
||||
with e -> Error e
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue