We'd love your help!
This project is Apache 2.0 licensed and accepts contributions via GitHub pull requests. This document outlines some of the conventions on development workflow, contact points and other resources to make it easier to get your contribution accepted.
We gratefully welcome improvements to documentation as well as to code.
- Docker version 23.0.0 or greater.
The injector is written in Zig. To work on the injector source code it is recommended to install Zig on your machine. You can find the installation instructions here. Install the version referenced in zig-version. The Zig Version Manager is also a good alternative to installing one specific version of Zig.
See the page Zig Learn for more information about the language.
make zig-buildto build the injector binary locally on your machinemake watch-zig-buildto continually rebuild the Zig sources on every change (requiresfdandentrto be installed)make zig-unit-teststo run the unit testswatch-zig-unit-teststo continually run the Zig unit tests on every change (requiresfdandentrto be installed)make teststo run the unit tests and the injector integration testsmake rpm-package deb-packageto build the RPM and Debian packagemake packaging-integration-test-deb packaging-integration-test-rpmto rebuild the RPM and Debian packages and run integration tests against the newly built packages.
It is recommended to follow the "GitHub Workflow". When using GitHub's CLI, here's how it typically looks like:
gh repo fork github.com/open-telemetry/opentelemetry-injector
git checkout -b your-feature-branch
# do your changes
git commit -sam "Add feature X"
gh pr createYour contribution is welcome! For it to be accepted, we have a few standards that must be followed.
Before starting the development of a new feature, please create an issue and discuss it with the project maintainers. Features should come with documentation and enough tests (unit and/or end-to-end).
Every bug fix should be accompanied by a unit test, so that we can prevent regressions.
They are mostly welcome!
The CHANGELOG.md file 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 must be unique since the last release.
During the collector release process, all ./.chloggen/*.yaml files are transcribed into CHANGELOG.md and then deleted.
If a changelog entry is not required, add either chore to the title of the pull request or add the "Skip Changelog" label to disable this action.
Recommended Steps
- Create an entry file using
make chlog-new. This generates a file based on your current branch (e.g../.chloggen/my-branch.yaml) - Fill in all fields in the new file
- Run
make chlog-validateto ensure the new file is valid - Commit and push the file
Alternately, copy ./.chloggen/TEMPLATE.yaml, or just create your file from scratch.