-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[cmd/mdatagen] add a way to generate configuration as part of README #23054
Conversation
436dec0
to
3c88bc4
Compare
This is amazing! Just one note that we have https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/cmd/configschema, which does a similar thing. The problem with the configschema is that it takes all the components as dependencies instead of parsing the I also suggested this format some time ago, but I like yours as well, it's just maybe harder to copy-paste for the end users. PTAL, what do you think. |
Thank you, I'll take a look. This is just a skunkworks weekend thing and it needs to be tendered to in the right way. All your suggestions help. |
Definitely seems like a good format to me. Especially because you'd then copy/paste this into your collector config, right? I haven't had time to get back to this code yet. |
Exactly |
c1e507f
to
b946520
Compare
I don't like that we introduce another package doing pretty similar to what configschema is doing. Maintaining them both is not ideal. I'd be happy to replace it, but we need a plan. One suggestion:
Another suggestion:
I like the second one, but it might be a lot of work. |
I get it. It’s a spike and I learned something from it: we will need to do more to get default values, reading the ast tree is not enough. Sounds to me like configschema can generate all the yaml files, and we use those to generate config and README then. Eventually configschema can be deprecated and removed once we stabilize the yaml files approach. |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
Closed as inactive. Feel free to reopen if this PR is still being worked on. |
Description:
Add a way to generate configuration as part of README.
Link to tracking Issue:
Not yet.
Testing:
Unit tests
Documentation:
N/A