feat: debug the library is set via OTEL_OCAML_DEBUG

This commit is contained in:
Simon Cruanes 2022-04-19 13:27:07 -04:00
parent 51cebfd383
commit 9d4bb5a97f
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4

View file

@ -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