Thanks a lot for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional documentation, we really appreciate your help. Take a look through this document to make sure we can give you a great experience with your contribution.
We're always happy to hear about any bugs or features requests using GitHub issues.
When filing an issue, please try to include as much information as you can. Details like these are incredibly useful:
- A reproducible test case or series of steps
- The version of our code being used
- Any modifications you've made relevant to the bug
- Anything unusual about your environment or deployment
Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:
- You are working against the latest source on the main branch.
- You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already.
- You open an issue to discuss any significant work - we would hate for your time to be wasted.
- You are not mixing substantial refactoring changes in with functional changes.
- If refactoring is desirable, publish a separate refactoring PR first, followed by a functional change PR. This will ensure safe and efficient reviews.
- PRs that do not meet these expectations will be rejected.
To send us a pull request, please:
- Fork the repository.
- Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
- Ensure local tests pass.
- Commit to your fork using clear commit messages.
- Send us a pull request, answering any default questions in the pull request interface.
- Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.
- Please do not squash commits between revisions, this makes review challenging, as the diff between revisions is harder to find and review.
GitHub provides additional document on forking a repository and creating a pull request.
The following sections provide some guidance that will help you make contributions.
From aws-otel-python-instrumentation
dir, execute:
./scripts/build_and_install_distro.sh
- Setup env and install project dependencies
mkdir auto_instrumentation
virtualenv auto_instrumentation
source auto_instrumentation/bin/activate
pip install flask requests boto3 opentelemetry-instrumentation-flask opentelemetry-instrumentation-botocore opentelemetry-instrumentation
- Install the project pkg by following "Build a Wheel file locally" step above. Please make sure to install “aws-opentelemetry-distro” by following steps instead of install "opentelemetry-distro” directly.
- Add AWS test account credential into the terminal, setup environment variable and run sample server:
export OTEL_PYTHON_DISTRO="aws_distro"
export OTEL_PYTHON_CONFIGURATOR="aws_configurator"
opentelemetry-instrument python ./sample-applications/simple-client-server/server_automatic_s3client.py
- Prepare a client.py, an example is
./tests/client.py
, open a new terminal and run sample client:
python ./sample-applications/simple-client-server/client.py testing
The span content will be output into terminal console
This package applies code style check automatically when created a push/pull request to the project repository. You can apply style check locally before submitting the PR by following:
- Install related packages:
pip install isort pylint black flake8 codespell readme_renderer
- Check code style errors using codespell and lint:
codespell
python scripts/eachdist.py lint --check-only
- Apply the fix for the errors automatically:
codespell . --write-changes
python scripts/eachdist.py lint
This package detects all the unit tests defined in folder with naming "tests"/"test" under the same directory as pyproject.toml file. Please make sure to add unit test every time a new feature added.
The workflow will run the test tox environment automatically whenever there is a push/pull request. Please make sure you install the related package needed for the unit tests in commands_pre
.
If you want to test a specific component/feature, please add a new environment in tox.ini file, and add related workflow as needed.
Looking at the existing issues is a great way to find something to contribute on. As this is a repository for experimenting and trying out new integrations, there may be few open issues filed but we're always happy to add more test apps for different frameworks.
This project has adopted the Amazon Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our vulnerability reporting page. Please do not create a public github issue.
See the LICENSE file for our project's licensing. When contributing code, make sure there are no copyright headers - the code is available for users to copy into their own apps.