Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for more verbose debugging information #35

Open
ELLIOTTCABLE opened this issue Aug 2, 2023 · 2 comments
Open

Allow for more verbose debugging information #35

ELLIOTTCABLE opened this issue Aug 2, 2023 · 2 comments

Comments

@ELLIOTTCABLE
Copy link
Collaborator

At the moment, enabling debugging via OTEL_OCAML_DEBUG=true ./binary.exe only prints information like the following:

opentelemetry: send http POST to http://127.0.0.1:5996/v1/traces (963B)
opentelemetry: send http POST to http://127.0.0.1:5996/v1/traces (963B)

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 like OTEL_OCAML_DEBUG=verbose, or as a separate env-var, like OTEL_OCAML_VERBOSE=true?

@c-cube
Copy link
Member

c-cube commented Aug 2, 2023

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".

@ELLIOTTCABLE
Copy link
Collaborator Author

(Though to be clear, that ^^ is a separate problem from "span-entry / span-exit debugging details, regardless of collector status)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants