From 6bf41e461f13b2a0c70094f66d9117032d23b082 Mon Sep 17 00:00:00 2001 From: Mackenzie <63265430+mackjmr@users.noreply.github.com> Date: Tue, 13 Jun 2023 18:33:39 +0200 Subject: [PATCH] Add metadata.yaml as a requirement (#23340) Fixes: https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/20908. --------- Co-authored-by: Yang Song --- CONTRIBUTING.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 991dceaa0419..c0259ce9de9a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -110,6 +110,7 @@ Components refer to connectors, exporters, extensions, processors, and receivers * Implement the [component.Component](https://pkg.go.dev/go.opentelemetry.io/collector/component#Component) interface * Provide a configuration structure which defines the configuration of the component * Provide the implementation which performs the component operation +* Have a `metadata.yaml` file and its generated code (using [mdatadgen](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/cmd/mdatagen/README.md)). Familiarize yourself with the interface of the component that you want to write, and use existing implementations as reference. [Building a Trace Receiver](https://opentelemetry.io/docs/collector/trace-receiver/) tutorial provides a detailed example of building a component. @@ -145,6 +146,7 @@ and the rest of contributors. - Add the sponsor for your component and yourself to a new line for your component in the [`.github/CODEOWNERS`](./.github/CODEOWNERS) file. - Run `make generate-gh-issue-templates` to add your component to the dropdown list in the issue templates. +- Create a `metadata.yaml` file with at minimum the required fields defined in [metadata-schema.yaml](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/cmd/mdatagen/metadata-schema.yaml) and use the [metadata generator](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/cmd/mdatagen/README.md#using-the-metadata-generator) to generate the associated code/documentation. When submitting a component to the community, consider breaking it down into separate PRs as follows: