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

docs: relocate Resque config option comments to render in Yard docs #834

Merged
merged 2 commits into from
Jan 26, 2024

Conversation

robbkidd
Copy link
Member

@robbkidd robbkidd commented Jan 24, 2024

As formatted markdown comments on the class, the information is made visible in the Yard-generated docs without making the options appear to be class or instance variables. Possibly instrumentation READMEs could link in the Usage section to the instrumentation's latest version at rubydoc.info (for example, this here resque) to avoid repeating the details of config options in the README but still making the options discoverable from there.

Placing all this on the Instrumentation class is in contrast to the approach used in #824 where each option has a distinct comment.

Advantages to class-level doc comment:

  1. The option names do not appear to be class or instance methods on Instrumentation within the documentation.
  2. The documentation can be included and rendered higher up the module namespace (on OTel::Inst::Resque) with a single line while the doc content still lives close(ish) to the option declarations.
  3. Simpler than holding Yard macros the right way.

Disadvantages to class-level doc comment:

  1. The documentation is a little removed from the option declarations.

Screenshots!

Screenshot 2024-01-24 at 3 02 07 PM

... and scroll down a bit ...

Screenshot 2024-01-24 at 3 04 43 PM

As formatted markdown comments on the class, the information is made visible
in the Yard-generated docs without making the options appear to be class or
instance variables.
@robbkidd robbkidd requested review from a team January 24, 2024 21:33
@robbkidd robbkidd self-assigned this Jan 24, 2024
@robbkidd robbkidd added the documentation Improvements or additions to documentation label Jan 24, 2024
Copy link
Collaborator

@arielvalentin arielvalentin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is going to help your customers I think that getting this merged will be ok with me, however per our slack conversations I think longer term what we want is a way to document individual options and then somehow render them in the README.

@robbkidd robbkidd merged commit 56ff830 into open-telemetry:main Jan 26, 2024
47 checks passed
@robbkidd robbkidd deleted the better-yard-docs-for-resque branch January 26, 2024 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants