From 9d4bb5a97f833aa4588de8b8cf9dd5ccbc4f40ab Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Tue, 19 Apr 2022 13:27:07 -0400 Subject: [PATCH] feat: debug the library is set via OTEL_OCAML_DEBUG --- src/client/common_.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/common_.ml b/src/client/common_.ml index 7646b327..d8bf312a 100644 --- a/src/client/common_.ml +++ b/src/client/common_.ml @@ -2,7 +2,7 @@ module Atomic = Opentelemetry_atomic.Atomic let[@inline] (let@) f x = f x -let debug_ = ref (try bool_of_string @@ Sys.getenv "DEBUG" with _ -> false) +let debug_ = ref (match Sys.getenv_opt "OTEL_OCAML_DEBUG" with Some ("1"|"true") -> true | _ -> false) let lock_ : (unit -> unit) ref = ref ignore let unlock_ : (unit -> unit) ref = ref ignore