fix warnings

This commit is contained in:
Simon Cruanes 2025-11-03 11:51:54 -05:00
parent f51d52abfc
commit 8290b9bd81
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4
3 changed files with 16 additions and 7 deletions

View file

@ -81,8 +81,14 @@ let report_err_ = function
| `Sysbreak -> Printf.eprintf "opentelemetry: ctrl-c captured, stopping\n%!"
| `Failure msg ->
Format.eprintf "@[<2>opentelemetry: export failed: %s@]@." msg
| `Status (code, { Opentelemetry.Proto.Status.code = scode; message; details })
->
| `Status
( code,
{
Opentelemetry.Proto.Status.code = scode;
message;
details;
_presence = _;
} ) ->
let pp_details out l =
List.iter
(fun s -> Format.fprintf out "%S;@ " (Bytes.unsafe_to_string s))

View file

@ -61,8 +61,14 @@ let report_err_ = function
| `Sysbreak -> Printf.eprintf "opentelemetry: ctrl-c captured, stopping\n%!"
| `Failure msg ->
Format.eprintf "@[<2>opentelemetry: export failed: %s@]@." msg
| `Status (code, { Opentelemetry.Proto.Status.code = scode; message; details })
->
| `Status
( code,
{
Opentelemetry.Proto.Status.code = scode;
message;
details;
_presence = _;
} ) ->
let pp_details out l =
List.iter
(fun s -> Format.fprintf out "%S;@ " (Bytes.unsafe_to_string s))

View file

@ -23,9 +23,6 @@ let log_level_to_severity (level : Logs.level) : Otel.Logs.severity =
(* Logs Util *)
(*****************************************************************************)
let create_tag (tag : string) : string Logs.Tag.def =
Logs.Tag.def tag Format.pp_print_string
let emit_telemetry_tag =
Logs.Tag.def ~doc:"Whether or not to emit this log via telemetry"
"emit_telemetry" Format.pp_print_bool