opentelemetry-collector-contrib icon indicating copy to clipboard operation
opentelemetry-collector-contrib copied to clipboard

[cmd/configschema] use contrib components, simplify grepmod code

Open pmcollins opened this issue 2 years ago • 1 comments

The configschema module makes available an API to get metadata about component configs. It also provides a command, docsgen, to generate markdown files for each component, describing its configuration fields, types, and default values.

This functionality got moved from core a few months back, but there was some additional work remaining. This change finishes that work, making configschema compatible with contrib.

This change also adds a makefile target, which runs docsgen all, writing over 140 markdown files to their corresponding component directories. For reference, one example markdown file is included in this PR (for the Redis receiver).

We will likely want to get a markdown generation job running as well, but that will be handled as a separate effort.

Addresses https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/12639

pmcollins avatar Jul 20 '22 23:07 pmcollins

Please take a look at the failing CI checks

dmitryax avatar Jul 28 '22 18:07 dmitryax

@pmcollins can you please fix the failing CI checks and rebase?

dmitryax avatar Aug 10 '22 19:08 dmitryax

Failing tests seem to be related. In order to make markdown-link-check tool happy, you'd probably need to add another section in https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/.github/workflows/check_links_config.json#L2 to ignore anchor links

dmitryax avatar Aug 10 '22 19:08 dmitryax

Hi @dmitryax -- all checks have passed 🎉

pmcollins avatar Aug 15 '22 18:08 pmcollins

Oh I see you created https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/13384 already. Let's move the discussion there

dmitryax avatar Aug 16 '22 20:08 dmitryax