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

[experiment] Auto-generate documentation for jaeger-v2 configuration structs via AST #6628

Open
4 tasks
yurishkuro opened this issue Jan 28, 2025 · 5 comments · May be fixed by #6776
Open
4 tasks

[experiment] Auto-generate documentation for jaeger-v2 configuration structs via AST #6628

yurishkuro opened this issue Jan 28, 2025 · 5 comments · May be fixed by #6776
Labels
documentation good first issue Good for beginners help wanted Features that maintainers are willing to accept but do not have cycles to implement v2

Comments

@yurishkuro
Copy link
Member

We are still blocked on the main issue #6186 by schema-first efforts in OTEL Collector not progressing. I wonder if we could instead use the Go's AST library to navigate the hierarchy of known config structs and extract the comments and other metadata needed for the docs, and/or config examples.

There are various blog posts showing examples of using AST.

The tool could have just a hardcoded list of starting configuration structs, both from Jaeger and from OTEL code base, e.g. cmd/jaeger/internal/extension/jaegerquery/config.go.

Rough outline of the milestones:

  • basic framework that navigates to the listed structs via AST (and prints something simple)
  • recursively evaluate nested structs (and print a hierarchy)
  • print complete info about config structs (e.g. as YAML or JSON output) including field names, types, descriptions (from comments)
  • enhance Jaeger docs to use the output from last step to render docs in HTML
@yurishkuro yurishkuro added good first issue Good for beginners help wanted Features that maintainers are willing to accept but do not have cycles to implement labels Jan 28, 2025
@danish9039
Copy link
Contributor

working on it

@vaishnavi192
Copy link

Can I also work on any one of the mentioned points? @danish9039 @yurishkuro

@danish9039
Copy link
Contributor

Can I also work on any one of the mentioned points? @danish9039 @yurishkuro

yeah sure

@AnmolxSingh
Copy link
Contributor

after printing info about config structs how to render docs in HTML

@yurishkuro
Copy link
Member Author

Let's start with printing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation good first issue Good for beginners help wanted Features that maintainers are willing to accept but do not have cycles to implement v2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants