Thank you for your interest in contributing to the Sumo Logic OpenTelemetry Collector Packaging project! This document provides guidelines and information for contributors.
- Code of Conduct
- Getting Started
- How to Contribute
- Development Workflow
- Building and Testing
- Submitting Changes
- Reporting Issues
- Community
This project follows the Sumo Logic Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to the project maintainers.
- CMake (version 3.x or higher)
- Docker (for containerized builds)
- Git
- For local builds, platform-specific dependencies:
- Linux:
dpkg,rpmbuild, etc. - macOS: Xcode command line tools
- Windows: WiX Toolset for MSI builds
- Linux:
git clone https://github.com/SumoLogic/sumologic-otel-collector-packaging.git
cd sumologic-otel-collector-packagingWe welcome contributions in the following areas:
- Bug fixes: Fix issues in packaging scripts, install scripts, or configurations
- New package targets: Add support for new platforms or distributions
- Documentation: Improve README files, add examples, or clarify instructions
- Configuration management: Enhance Chef, Ansible, or Puppet examples
- Install scripts: Improve installation scripts for various platforms
- Testing: Add or improve test coverage
Fork the repository to your GitHub account and clone your fork:
git clone https://github.com/YOUR_USERNAME/sumologic-otel-collector-packaging.git
cd sumologic-otel-collector-packaging
git remote add upstream https://github.com/SumoLogic/sumologic-otel-collector-packaging.gitMake your changes following these guidelines:
- Follow existing code style and conventions
- Keep changes focused and atomic
- Write clear, descriptive commit messages
- Add or update documentation as needed
- Test your changes thoroughly
Write clear and meaningful commit messages:
git add .
git commit -m "brief description of changes"Commit message format:
<type>: <subject>
<body>
<footer>
Types: feat, fix, docs, chore, test, refactor
Example:
fix: correct systemd service restart logic in Chef cookbook
The Chef resource was attempting to restart the service before it was
fully initialized, causing failures on Windows. Remove the restart
action from the resource and rely on the recipe's service resource
to properly manage the service state.
Fixes #123
find targets -name '*.cmake' -exec basename -s .cmake {} \;export TARGET=otc_linux_amd64_deb # or your target
export OTC_VERSION=0.148.0
export OTC_SUMO_VERSION=0
export OTC_BUILD_NUMBER=1NOTE: This method only supports building deb & rpm packages.
-
First bake and load the image:
docker buildx bake --load
-
Build the Makefile:
docker run \ -e TARGET="$TARGET" \ -e OTC_VERSION="$OTC_VERSION" \ -e OTC_SUMO_VERSION="$OTC_SUMO_VERSION" \ -e OTC_BUILD_NUMBER="$OTC_BUILD_NUMBER" \ -v $(pwd):/src \ -v $(pwd)/build:/build \ otelcol-sumo/cmake \ cmake /src
-
Build the package:
docker run \ -v $(pwd):/src \ -v $(pwd)/build:/build \ otelcol-sumo/cmake \ make package
Building locally requires dependencies that will differ based on your platform and the packages that you are trying to build. You will need CMake to get started.
-
Build the Makefile:
cd build && cmake ../
-
Build the package:
make package
For detailed Chef cookbook contribution guidelines, see examples/chef/sumologic-otel-collector/CONTRIBUTING.md.
Quick testing with chef-solo:
cd examples/chef
# Create attributes file
cat > my-sumologic-wrapper/attributes/default.rb <<EOF
default['sumologic_otel_collector']['installation_token'] = 'YOUR_TOKEN'
default['sumologic_otel_collector']['collector_tags'] = {
'environment' => 'test'
}
EOF
# Run with chef-solo
sudo chef-solo -o 'recipe[my-sumologic-wrapper]' --config-option cookbook_path=$(pwd)See examples/ansible/README.md
-
Sync with upstream:
git fetch upstream git rebase upstream/main
-
Run linters (if applicable):
# GitHub Actions will run actionlint actionlint .github/workflows/*.yml
-
Test your changes on relevant platforms
-
Update documentation if needed
-
Push your branch to your fork:
git push origin feature/your-feature-name
-
Go to the original repository and create a pull request
-
Fill out the pull request template with:
- Clear description of changes
- Related issue numbers (if applicable)
- Testing performed
- Screenshots (if UI changes)
- Keep PRs focused on a single concern
- Ensure CI checks pass
- Respond to review feedback promptly
- Update your PR if the base branch has changed
- Keep the commit history clean (squash if needed)
- Code owners will automatically be assigned for review
- At least one approval is required before merging
- CI/CD checks must pass
- All review comments must be addressed
- Search existing issues to avoid duplicates
- Check the documentation and README
- Verify you're using the latest version
Include the following information:
- Clear title: Describe the issue concisely
- Description: Provide detailed information
- Steps to reproduce: For bugs, include exact steps
- Expected behavior: What should happen
- Actual behavior: What actually happens
- Environment:
- OS and version
- Package type (deb, rpm, msi, etc.)
- OTC version
- Configuration management tool (Chef, Ansible, Puppet)
- Logs: Include relevant error messages or logs
- Screenshots: If applicable
Use the provided issue templates in .github/ISSUE_TEMPLATE/ when available.
- Maintainers: @SumoLogic/open-source-collection-team, @SumoLogic/sensu-team
- GitHub Issues: For bug reports and feature requests
- Pull Requests: For code contributions
- Main README - Project overview and build instructions
- Examples - Configuration management examples
- Install Script - Installation script documentation
- Sumo Logic OpenTelemetry Collector - The collector itself
By contributing to this project, you agree that your contributions will be licensed under the Apache License 2.0. See the LICENSE file for details.
If you have questions that aren't covered in this guide, please:
- Check existing issues for similar questions
- Open a new issue with the "question" label
- Reach out to the maintainers
Thank you for contributing to Sumo Logic OpenTelemetry Collector Packaging!