We'd love to accept your patches and contributions to this project. There are just a few small guidelines you need to follow.
Contributions to this project must be accompanied by a Contributor License Agreement. You (or your employer) retain the copyright to your contribution; this simply gives us permission to use and redistribute your contributions as part of the project.
You generally only need to submit a CLA once, so if you've already submitted one (even if it was for a different project), you probably don't need to do it again.
All submissions, including submissions by project members, require review. We use GitHub pull requests for this purpose. Consult GitHub Help for more information on using pull requests.
The following section describes how setup your environment and build the collector distribution.
You will need the make
command which usually comes with some package such as build-essential
.
You will also need to install an appropriate version of go
.
Look at the current go.mod
file to see the minimum go
version.
All other required tools are installed automatically by make
.
Go-based tools and their versions are controlled by internal/tools
.
In order to manually install tools you may run make install-tools
, but make
will also install them as-needed during the build process if they are not installed.
In order to remove them run make clean-tools
or make clean-all
.
The command make
or make build
(the default target) will build the collector for your operating system and CPU architecture. The resulting binary will be bin/dynatrace-otel-collector
.
The command make snapshot
will build all supported OS and architecture versions of the collector.
The resulting binaries will be in the dist
directory.
The command make test
will run all collector tests.
It will build the collector first if required.
Most of the time make
will automatically detect when files need to be rebuilt, however sometimes you want to manually force a clean build.
The following commands delete generated files and compiled binaries:
make clean
removes most generated files except for the build tools.make clean-tools
removes all build toolsmake clean-all
removes all generated files and build tools
The file manifest.yaml
describes all components in the collector distribution.
See https://github.com/open-telemetry/opentelemetry-collector/tree/main/cmd/builder#configuration for details on the format of this file.
When adding a component, an example configuration for the component must be added to testbed/testdata/config-allcomponents.yaml
to test that it works with a basic configuration.
The CHANGELOG.md files in this repo is autogenerated from
.yaml
files in the /.chloggen directory.
Your pull request should add a new .yaml
file to this directory. The name of
your file can be arbitrary but must be unique since the last release.
During the release process, all ./chloggen/*.yaml
files are transcribed into
CHANGELOG.md
and then deleted.
- Create an entry file using
make chlog-new
. The command generates a new file, with its name based on the current branch (e.g../.chloggen/my-feature-xyz.yaml
). - Fill in all the fields in the generated file.
- Run
make chlog-validate
to ensure the new file is valid. - Commit and push the file.
Alternately, copy ./.chloggen/TEMPLATE.yaml
, or just create your file from scratch.
The release and hotfix processes are described in separate documents.