Skip to content

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

Open
@yurishkuro

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    documentationgood first issueGood for beginnershelp wantedFeatures that maintainers are willing to accept but do not have cycles to implementv2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions