Open ELLIOTTCABLE opened 1 year ago
After discussion: possibility to debug signals not being emitted because a collector hasn't been setup:
let backend : backend option ref = ref None
could become:
let backend : backend option ref =
ref (match Sys.getenv_opt "OTEL_OCAML_DEBUG" with
| Some _ -> Some debug_collector_
| None -> None)
where debug_collector_
intercepts all spans/metrics/logs and prints them on stderr with a warning like "span ignored because no collector was setup".
(Though to be clear, that ^^ is a separate problem from "span-entry / span-exit debugging details, regardless of collector status)
At the moment, enabling debugging via
OTEL_OCAML_DEBUG=true ./binary.exe
only prints information like the following:I'd like, additionally, the ability to print on every single span entered and exited — effectively a verbose mode.
Is this better attached to
OTEL_OCAML_DEBUG=true
, implemented as a new payload likeOTEL_OCAML_DEBUG=verbose
, or as a separate env-var, likeOTEL_OCAML_VERBOSE=true
?