mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-10 04:35:46 -04:00
fix warnings
This commit is contained in:
parent
f51d52abfc
commit
8290b9bd81
3 changed files with 16 additions and 7 deletions
|
|
@ -81,8 +81,14 @@ let report_err_ = function
|
||||||
| `Sysbreak -> Printf.eprintf "opentelemetry: ctrl-c captured, stopping\n%!"
|
| `Sysbreak -> Printf.eprintf "opentelemetry: ctrl-c captured, stopping\n%!"
|
||||||
| `Failure msg ->
|
| `Failure msg ->
|
||||||
Format.eprintf "@[<2>opentelemetry: export failed: %s@]@." 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 =
|
let pp_details out l =
|
||||||
List.iter
|
List.iter
|
||||||
(fun s -> Format.fprintf out "%S;@ " (Bytes.unsafe_to_string s))
|
(fun s -> Format.fprintf out "%S;@ " (Bytes.unsafe_to_string s))
|
||||||
|
|
|
||||||
|
|
@ -61,8 +61,14 @@ let report_err_ = function
|
||||||
| `Sysbreak -> Printf.eprintf "opentelemetry: ctrl-c captured, stopping\n%!"
|
| `Sysbreak -> Printf.eprintf "opentelemetry: ctrl-c captured, stopping\n%!"
|
||||||
| `Failure msg ->
|
| `Failure msg ->
|
||||||
Format.eprintf "@[<2>opentelemetry: export failed: %s@]@." 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 =
|
let pp_details out l =
|
||||||
List.iter
|
List.iter
|
||||||
(fun s -> Format.fprintf out "%S;@ " (Bytes.unsafe_to_string s))
|
(fun s -> Format.fprintf out "%S;@ " (Bytes.unsafe_to_string s))
|
||||||
|
|
|
||||||
|
|
@ -23,9 +23,6 @@ let log_level_to_severity (level : Logs.level) : Otel.Logs.severity =
|
||||||
(* Logs Util *)
|
(* Logs Util *)
|
||||||
(*****************************************************************************)
|
(*****************************************************************************)
|
||||||
|
|
||||||
let create_tag (tag : string) : string Logs.Tag.def =
|
|
||||||
Logs.Tag.def tag Format.pp_print_string
|
|
||||||
|
|
||||||
let emit_telemetry_tag =
|
let emit_telemetry_tag =
|
||||||
Logs.Tag.def ~doc:"Whether or not to emit this log via telemetry"
|
Logs.Tag.def ~doc:"Whether or not to emit this log via telemetry"
|
||||||
"emit_telemetry" Format.pp_print_bool
|
"emit_telemetry" Format.pp_print_bool
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue