-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add support for markdown generation #3100
Conversation
This is great! Can you please validate that this approach will work correctly for components imported from other repositories? For example we want OTLP receiver (which is in this repo) documentation in Collector contrib repo too. |
Thanks Tigran. So I experimented a bit, and the docsgen API will work, with minor modifications, when called from a separate repo (e.g. contrib), for components that live in that repo. For components that live in a separate repo, we will need to be able to map instances of configuration types (e.g. |
Sounds good, let's finalize this PR and then improve it. We should aim to replace READMEs by this approach. |
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
@pmcollins is this ready for review? |
This is ready for review now. : ) |
This looks good to me. @bogdandrutu thoughts? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it overall, looked only at the result md and added some suggestions, I trust @tigrannajaryan that he reviewed the code that generates the md
Thanks for reviewing @tigrannajaryan and @bogdandrutu 🙇 |
LGTM. Please rebase from main. |
Sure, done. |
Thanks @pmcollins ! |
This change contains a CLI tool, called 'docsgen', that generates markdown files for collector
components. The markdown files present the configuration metadata extracted by the
configschema
API in a human readable form that can be used to manually configure the collector.
This change also makes some modifications to the package formerly knows as
schemagen
, renamingit to
configschema
and exporting some things, because it no longer generates a schema yaml file, butrather provides an equivalent API used by docsgen.
Also, this PR includes one sample, generated .md document:
receiver/otlpreceiver/config.md