Skip to content

Commit d7052e0

Browse files
authored
Align README & CONTRIBUTING with ADOT Java (#181)
Aligns with the following: 1. https://github.com/aws-observability/aws-otel-java-instrumentation/blob/main/README.md - Note that I did not add "How it works" or "Standardized Sample Applications" as those sections are more substantially different compared to Python. 2. https://github.com/aws-observability/aws-otel-java-instrumentation/blob/main/CONTRIBUTING.md 3. https://github.com/aws-observability/aws-otel-java-instrumentation/blob/dc29a0c3f65875e2f0345032041f3c47b3c2bd73/build.gradle.kts#L225-L228 By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
1 parent e83e336 commit d7052e0

File tree

3 files changed

+93
-69
lines changed

3 files changed

+93
-69
lines changed

CONTRIBUTING.md

Lines changed: 63 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,15 @@
11
# Contributing Guidelines
22

3-
Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional
4-
documentation, we greatly value feedback and contributions from our community.
3+
Thanks a lot for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional
4+
documentation, we really appreciate your help. Take a look through this document to make sure we can give you a great
5+
experience with your contribution.
56

6-
Please read through this document before submitting any issues or pull requests to ensure we have all the necessary
7-
information to effectively respond to your bug report or contribution.
8-
9-
## Build and install distro locally
10-
From `aws-otel-python-instrumentation` dir, execute:
11-
```sh
12-
./scripts/build_and_install_distro.sh
13-
```
14-
15-
## Test a sample App
16-
1. Setup env and install project dependencies
17-
```sh
18-
mkdir auto_instrumentation
19-
virtualenv auto_instrumentation
20-
source auto_instrumentation/bin/activate
21-
pip install flask requests boto3 opentelemetry-instrumentation-flask opentelemetry-instrumentation-botocore opentelemetry-instrumentation
22-
```
23-
2. 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.
24-
3. Add AWS test account credential into the terminal, setup environment variable and run sample server:
25-
```sh
26-
export OTEL_PYTHON_DISTRO="aws_distro"
27-
export OTEL_PYTHON_CONFIGURATOR="aws_configurator"
28-
opentelemetry-instrument python ./sample-applications/simple-client-server/server_automatic_s3client.py
29-
```
30-
4. Prepare a client.py, an example is `./tests/client.py`, open a new terminal and run sample client:
31-
```sh
32-
python ./sample-applications/simple-client-server/client.py testing
33-
```
34-
The span content will be output into terminal console
357

368
## Reporting Bugs/Feature Requests
379

38-
We welcome you to use the GitHub issue tracker to report bugs or suggest features.
10+
We're always happy to hear about any bugs or features requests using GitHub issues.
3911

40-
When filing an issue, please check existing open, or recently closed, issues to make sure somebody else hasn't already
41-
reported the issue. Please try to include as much information as you can. Details like these are incredibly useful:
12+
When filing an issue, please try to include as much information as you can. Details like these are incredibly useful:
4213

4314
* A reproducible test case or series of steps
4415
* The version of our code being used
@@ -65,9 +36,64 @@ To send us a pull request, please:
6536
GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
6637
[creating a pull request](https://help.github.com/articles/creating-a-pull-request/).
6738

39+
The following sections provide some guidance that will help you make contributions.
40+
41+
### Build and install distro locally
42+
From `aws-otel-python-instrumentation` dir, execute:
43+
```sh
44+
./scripts/build_and_install_distro.sh
45+
```
46+
47+
### Test a sample App
48+
1. Setup env and install project dependencies
49+
```sh
50+
mkdir auto_instrumentation
51+
virtualenv auto_instrumentation
52+
source auto_instrumentation/bin/activate
53+
pip install flask requests boto3 opentelemetry-instrumentation-flask opentelemetry-instrumentation-botocore opentelemetry-instrumentation
54+
```
55+
2. 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.
56+
3. Add AWS test account credential into the terminal, setup environment variable and run sample server:
57+
```sh
58+
export OTEL_PYTHON_DISTRO="aws_distro"
59+
export OTEL_PYTHON_CONFIGURATOR="aws_configurator"
60+
opentelemetry-instrument python ./sample-applications/simple-client-server/server_automatic_s3client.py
61+
```
62+
4. Prepare a client.py, an example is `./tests/client.py`, open a new terminal and run sample client:
63+
```sh
64+
python ./sample-applications/simple-client-server/client.py testing
65+
```
66+
The span content will be output into terminal console
67+
68+
### Code Style Check
69+
70+
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:
71+
1. Install related packages:
72+
```sh
73+
pip install isort pylint black flake8 codespell readme_renderer
74+
```
75+
2. Check code style errors using codespell and lint:
76+
```sh
77+
codespell
78+
python scripts/eachdist.py lint --check-only
79+
```
80+
3. Apply the fix for the errors automatically:
81+
```sh
82+
codespell . --write-changes
83+
python scripts/eachdist.py lint
84+
```
85+
86+
### Unit test
87+
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.
88+
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`.
89+
90+
If you want to test a specific component/feature, please add a new environment in tox.ini file, and add related workflow as needed.
91+
6892

6993
## Finding contributions to work on
70-
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any 'help wanted' issues is a great place to start.
94+
Looking at the existing issues is a great way to find something to contribute on. As this is a repository for experimenting
95+
and trying out new integrations, there may be few open issues filed but we're always happy to add more test apps for
96+
different frameworks.
7197

7298

7399
## Code of Conduct
@@ -82,4 +108,5 @@ If you discover a potential security issue in this project we ask that you notif
82108

83109
## Licensing
84110

85-
See the [LICENSE](LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution.
111+
See the [LICENSE](LICENSE) file for our project's licensing. When contributing code, make sure there are no copyright
112+
headers - the code is available for users to copy into their own apps.

README.md

Lines changed: 27 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,38 @@
1-
# AWS Distro for OpenTelemetry Python Instrumentation
1+
# AWS Distro for OpenTelemetry - Instrumentation for Python
22

33
## Introduction
44

5-
This project provide AWS Distro base on [OpenTelemetry Python Contrib](https://github.com/open-telemetry/opentelemetry-python-contrib),
5+
This project is a redistribution of the [OpenTelemetry Distro for Python](https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/opentelemetry-distro),
66
preconfigured for use with AWS services. Please check out that project too to get a better
7-
understanding of the underlying internals.
7+
understanding of the underlying internals. You won't see much code in this repository since we only
8+
apply some small configuration changes, and our OpenTelemetry friends takes care of the rest. The
9+
exception to this is support for Application Signals.
810

9-
## Notices
11+
We provided a Python agent that can be attached to any application using a supported Python version and dynamically injects
12+
bytecode to capture telemetry from a number of popular libraries and frameworks. The telemetry data
13+
can be exported in a variety of formats. In addition, the agent and exporter can be configured via
14+
command line arguments or environment variables. The net result is the ability to gather telemetry
15+
data from a Python application without any code changes.
1016

11-
### Python Version Support
12-
This project ensures compatibility with the following supported Python versions: 3.8, 3.9, 3.10, 3.11
13-
14-
## Code Style Check
15-
16-
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:
17-
1. Install related packages:
18-
```sh
19-
pip install isort pylint black flake8 codespell readme_renderer
20-
```
21-
2. Check code style errors using codespell and lint:
22-
```sh
23-
codespell
24-
python scripts/eachdist.py lint --check-only
25-
```
26-
3. Apply the fix for the errors automatically:
27-
```sh
28-
codespell . --write-changes
29-
python scripts/eachdist.py lint
30-
```
31-
32-
## Unit test
33-
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.
34-
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`.
35-
36-
If you want to test a specific component/feature, please add a new environment in tox.ini file, and add related workflow as needed.
17+
## Getting Started
18+
19+
Check out the [getting started documentation](https://aws-otel.github.io/docs/getting-started/python-sdk/auto-instr).
20+
21+
## Supported Python libraries and frameworks
22+
For the complete list of supported frameworks, please refer to the [OpenTelemetry for Python documentation](https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/instrumentation/README.md).
23+
24+
## Support
25+
26+
Please note that as per policy, we're providing support via GitHub on a best effort basis. However, if you have AWS Enterprise Support you can create a ticket and we will provide direct support within the respective SLAs.
27+
28+
## Security issue notifications
29+
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue.
3730

3831
## License
3932

4033
This project is licensed under the Apache-2.0 License.
4134

35+
## Notices
36+
37+
### Python Version Support
38+
This project ensures compatibility with the following supported Python versions: 3.8, 3.9, 3.10, 3.11

aws-opentelemetry-distro/README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
AWS OpenTelemetry Distro
2-
========================================
1+
AWS Distro For OpenTelemetry Python Distro
2+
============================================
33

44
Installation
55
------------
@@ -9,7 +9,7 @@ Installation
99
pip install aws-opentelemetry-distro
1010

1111

12-
This package provides AWS OpenTelemetry Python Distro, which allows for auto-instrumentation of Python applications.
12+
This package provides Amazon Web Services distribution of the OpenTelemetry Python Instrumentation, which allows for auto-instrumentation of Python applications.
1313

1414
References
1515
----------

0 commit comments

Comments
 (0)