open-telemetry / opentelemetry-collector

OpenTelemetry Collector
https://opentelemetry.io
Apache License 2.0
4.34k stars 1.44k forks source link

[cmd/builder] Steps listed in README for debugging are too open ended #9101

Open cwegener opened 10 months ago

cwegener commented 10 months ago

The debug section in the builder README is a good starting point in that it includes the important initial steps (debug_compilation setting + how to use go-delve dlv exec), but there are mandatory additional step after that to actually meaningfully use delve

It took me much too long to figure out that I had to add a very simple delve configuration in order to be able to use the delve cli for debugging.

The README only gives a very vague hint about "go set up your IDE now ...", which I imagine might work for people who use IDEs and are familiar with what buttons to press and so forth.

In order to improve the experience, I can see the following options:

  1. Add a new subsection to the Debug section for configuring the delve cli to use the correct path substitutions
  2. At the same time, move this last sentence into another subsection for IDEs https://github.com/open-telemetry/opentelemetry-collector/blob/1d0d1ef21baebfcc9ed1d67f0237437ceb9a0049/cmd/builder/README.md?plain=1#L91
  3. For IDE users, maybe give some indication of which IDEs are proven to work and are used by the maintainers. But I'd be happy to hear from IDE users what they think about the current documentation for setting up delve for otelcollector (I don't use IDEs)
mx-psi commented 10 months ago

@cwegener I am happy to review a PR clarifying this if you are up to open one :)

cwegener commented 10 months ago

@cwegener I am happy to review a PR clarifying this if you are up to open one :)

Will do!