Open
Description
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
Activity