Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore][CONTRIBUTING.md] Update adding component directions #32957

Merged
merged 5 commits into from
May 10, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 14 additions & 24 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,24 +161,6 @@ and its contributors.
and in the respective testing harnesses. To align with the test goal of the project, components must be testable within the framework defined within
the folder. If a component can not be properly tested within the existing framework, it must increase the non testable
components number with a comment within the PR explaining as to why it can not be tested.
- Enable [goleak checks](https://github.com/uber-go/goleak) to help ensure your component does not leak goroutines. This
requires adding a file named `package_test.go` to every sub-directory containing tests. This file should have the following contents by default:
```
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

package fooreceiver

import (
"testing"

"go.uber.org/goleak"
)

func TestMain(m *testing.M) {
goleak.VerifyTestMain(m)
}
```

- Create a `metadata.yaml` file with at minimum the required fields defined in [metadata-schema.yaml](https://github.com/open-telemetry/opentelemetry-collector/blob/main/cmd/mdatagen/metadata-schema.yaml).
Here is a minimal representation:
Expand Down Expand Up @@ -234,12 +216,20 @@ When submitting a component to the community, consider breaking it down into sep
* **Second PR** should include the concrete implementation of the component. If the
size of this PR is larger than the recommended size consider splitting it in
multiple PRs.
* **Last PR** should mark the new component as `Alpha` stability and add it to the `cmd/otelcontribcol`
binary by updating the `cmd/otelcontribcol/builder-config.yaml` file and running `make genotelcontribcol`.
The component's tests must also be added as a part of its respective `component_type_tests.go` file in the `cmd/otelcontribcol` directory.
The component must be enabled only after sufficient testing and only when it meets [`Alpha` stability requirements](https://github.com/open-telemetry/opentelemetry-collector#alpha).
* Once a new component has been added to the executable, please add the component
to the [OpenTelemetry.io registry](https://github.com/open-telemetry/opentelemetry.io#adding-a-project-to-the-opentelemetry-registry).
* **Last PR** should mark the new component as `Alpha` stability.
* Update its `metadata.yaml` file.
* Mark the stability as `alpha`
* Add `contrib` to the list of distributions
* Add it to the `cmd/otelcontribcol` binary by updating the `cmd/otelcontribcol/builder-config.yaml` file.
* Please also run:
- `make generate`
- `make genotelcontribcol`
* The component's tests must also be added as a part of its respective `component_type_tests.go` file in the `cmd/otelcontribcol` directory.
* The component must be enabled only after sufficient testing and only when it meets [`Alpha` stability requirements](https://github.com/open-telemetry/opentelemetry-collector#alpha).
* Once a new component has been added to the executable:
* Please add the component
to the [OpenTelemetry.io registry](https://github.com/open-telemetry/opentelemetry.io#adding-a-project-to-the-opentelemetry-registry).
* Please also submit a PR to the [OpenTelemetry Collector Releases](https://github.com/open-telemetry/opentelemetry-collector-releases) repository to include your component in future releases of the OpenTelemetry Collector `contrib` distribution.
crobert-1 marked this conversation as resolved.
Show resolved Hide resolved

### Releasing New Components
After a component has been approved and merged, and has been enabled in `internal/components/`, it must be added to the
Expand Down
Loading