open-telemetry / opentelemetry.io

The OpenTelemetry website and documentation
https://opentelemetry.io
Creative Commons Attribution 4.0 International
542 stars 1.2k forks source link

Automate the Collector list of internal metrics using `mdatagen` docs #4523

Open tiffany76 opened 5 months ago

tiffany76 commented 5 months ago

Desired feature or idea: The Collector's internal metrics were recently added to the metadata generating tool mdatagen in https://github.com/open-telemetry/opentelemetry-collector/pull/10170. Basic documentation is now automatically generated in repo markdown files for each component, for example:

A manually compiled list of metrics is included on the internal telemetry page of the website, but concerns have been raised about maintaining it.

Can we incorporate the mdatagen automated docs into the OTel website?

Additional context:

svrnm commented 5 months ago

Thanks for raising this issue.

We can (and should) incorporate that data into the otel website. Ideally this data flows into the registry and then we reuse it from there in the documentation.

To do so we need to collaborate with @open-telemetry/collector-approvers / @open-telemetry/collector-maintainers to automate that (and maybe enrich the metadata file even further)

theletterf commented 5 months ago

We leverage mdatagen files in the Splunk distro's docs using client side JS. For example, this table...

https://docs.splunk.com/observability/en/gdi/opentelemetry/components/kubelet-stats-receiver.html#metrics

Is built using this file...

https://raw.githubusercontent.com/splunk/collector-config-tools/main/metric-metadata/kubeletstatsreceiver.yaml

...through this JS logic:

https://github.com/splunk/public-o11y-docs/blob/main/_static/jsonpull-splunk.js