Skip to content

Commit 41ecf14

Browse files
authored
Merge branch 'main' into feature/asyncio-instrumentation
2 parents 48be2c3 + 1a984d3 commit 41ecf14

File tree

10 files changed

+78
-41
lines changed

10 files changed

+78
-41
lines changed

.github/workflows/instrumentations_0.yml

+30-1
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,35 @@ jobs:
7373
- "tornado"
7474
- "tortoiseorm"
7575
os: [ubuntu-20.04]
76+
exclude:
77+
- python-version: py39
78+
package: "sklearn"
79+
- python-version: py310
80+
package: "sklearn"
81+
- python-version: py311
82+
package: "sklearn"
83+
- python-version: pypy3
84+
package: "aiopg"
85+
- python-version: pypy3
86+
package: "asyncpg"
87+
- python-version: pypy3
88+
package: "boto"
89+
- python-version: pypy3
90+
package: "boto3sqs"
91+
- python-version: pypy3
92+
package: "botocore"
93+
- python-version: pypy3
94+
package: "psycopg2"
95+
- python-version: pypy3
96+
package: "remoulade"
97+
- python-version: pypy3
98+
package: "requests"
99+
- python-version: pypy3
100+
package: "sklearn"
101+
- python-version: pypy3
102+
package: "confluent-kafka"
103+
- python-version: pypy3
104+
package: "grpc"
76105
steps:
77106
- name: Checkout Contrib Repo @ SHA - ${{ github.sha }}
78107
uses: actions/checkout@v2
@@ -81,7 +110,7 @@ jobs:
81110
with:
82111
python-version: ${{ env[matrix.python-version] }}
83112
- name: Install tox
84-
run: pip install tox==3.27.1 tox-factor
113+
run: pip install tox
85114
- name: Cache tox environment
86115
# Preserves .tox directory between runs for faster installs
87116
uses: actions/cache@v1

.github/workflows/instrumentations_1.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ jobs:
3535
- "propagator-ot-trace"
3636
- "resource-detector-container"
3737
os: [ubuntu-20.04]
38+
exclude:
39+
- python-version: py311
40+
package: "prometheus-remote-write"
41+
- python-version: pypy3
42+
package: "prometheus-remote-write"
3843
steps:
3944
- name: Checkout Contrib Repo @ SHA - ${{ github.sha }}
4045
uses: actions/checkout@v2
@@ -43,7 +48,7 @@ jobs:
4348
with:
4449
python-version: ${{ env[matrix.python-version] }}
4550
- name: Install tox
46-
run: pip install tox==3.27.1 tox-factor
51+
run: pip install tox
4752
- name: Cache tox environment
4853
# Preserves .tox directory between runs for faster installs
4954
uses: actions/cache@v1

.github/workflows/prepare-patch-release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
with:
5555
python-version: 3.9
5656
- name: Install tox
57-
run: pip install tox==3.27.1
57+
run: pip install tox
5858
- name: run tox
5959
run: tox -e generate
6060

.github/workflows/prepare-release-branch.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
with:
8282
python-version: 3.9
8383
- name: Install tox
84-
run: pip install tox==3.27.1
84+
run: pip install tox
8585
- name: run tox
8686
run: tox -e generate
8787

@@ -165,7 +165,7 @@ jobs:
165165
with:
166166
python-version: 3.9
167167
- name: Install tox
168-
run: pip install tox==3.27.1
168+
run: pip install tox
169169
- name: run tox
170170
run: tox -e generate
171171

.github/workflows/test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
with:
2525
python-version: "3.10"
2626
- name: Install tox
27-
run: pip install tox==3.27.1
27+
run: pip install tox
2828
- name: Install libsnappy-dev
2929
if: ${{ matrix.tox-environment == 'lint' }}
3030
run: sudo apt-get install -y libsnappy-dev

CONTRIBUTING.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ some aspects of development, including testing against multiple Python versions.
3232
To install `tox`, run:
3333

3434
```console
35-
$ pip install tox==3.27.1
35+
$ pip install tox
3636
```
3737

3838
You can run `tox` with the following arguments:
@@ -107,7 +107,7 @@ Run tests:
107107

108108
```sh
109109
# make sure you have all supported versions of Python installed
110-
$ pip install tox==3.27.1 # only first time.
110+
$ pip install tox # only first time.
111111
$ tox # execute in the root of the repository
112112
```
113113

@@ -177,7 +177,7 @@ For a deeper discussion, see: https://github.com/open-telemetry/opentelemetry-sp
177177
## Running Tests Locally
178178

179179
1. Go to your Contrib repo directory. `git clone [email protected]:open-telemetry/opentelemetry-python-contrib.git && cd opentelemetry-python-contrib`.
180-
2. Make sure you have `tox` installed. `pip install tox==3.27.1`.
180+
2. Make sure you have `tox` installed. `pip install tox`.
181181
3. Run `tox` without any arguments to run tests for all the packages. Read more about [tox](https://tox.readthedocs.io/en/latest/).
182182

183183
### Testing against a different Core repo branch/commit

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ Emeritus Maintainers:
128128
1. Go to your Contrib repo directory. `cd ~/git/opentelemetry-python-contrib`.
129129
2. Create a virtual env in your Contrib repo directory. `python3 -m venv my_test_venv`.
130130
3. Activate your virtual env. `source my_test_venv/bin/activate`.
131-
4. Make sure you have `tox` installed. `pip install tox==3.27.1`.
131+
4. Make sure you have `tox` installed. `pip install tox`.
132132
5. Run tests for a package. (e.g. `tox -e test-instrumentation-flask`.)
133133

134134
### Thanks to all the people who already contributed!

instrumentation/opentelemetry-instrumentation-confluent-kafka/pyproject.toml

-3
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ classifiers = [
1919
"Programming Language :: Python",
2020
"Programming Language :: Python :: 3",
2121
"Programming Language :: Python :: 3.8",
22-
"Programming Language :: Python :: 3.9",
23-
"Programming Language :: Python :: 3.10",
24-
"Programming Language :: Python :: 3.11",
2522
]
2623
dependencies = [
2724
"opentelemetry-api ~= 1.12",

instrumentation/opentelemetry-instrumentation-urllib/tests/test_metrics_instrumentation.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515

1616
from platform import python_implementation
17-
from sys import version_info
1817
from timeit import default_timer
1918
from urllib import request
2019
from urllib.parse import urlencode
@@ -189,8 +188,7 @@ def test_basic_metric_request_not_empty(self):
189188
)
190189

191190
@mark.skipif(
192-
python_implementation() == "PyPy" or version_info.minor == 7,
193-
reason="Fails randomly in 3.7 and pypy",
191+
python_implementation() == "PyPy", reason="Fails randomly in pypy"
194192
)
195193
def test_metric_uninstrument(self):
196194
with request.urlopen(self.URL):

tox.ini

+33-25
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ envlist =
3535
; instrumentation-aiopg intentionally excluded from pypy3
3636

3737
; opentelemetry-instrumentation-aws-lambda
38-
py3{8,9}-test-instrumentation-aws-lambda
38+
py3{8,9,10,11}-test-instrumentation-aws-lambda
39+
pypy3-test-instrumentation-aws-lambda
3940

4041
; opentelemetry-instrumentation-botocore
4142
py3{8,9,10,11}-test-instrumentation-botocore
@@ -92,7 +93,7 @@ envlist =
9293

9394
; opentelemetry-instrumentation-urllib3
9495
py3{8,9,10,11}-test-instrumentation-urllib3v-{1,2}
95-
;pypy3-test-instrumentation-urllib3v-{1,2}
96+
pypy3-test-instrumentation-urllib3v-{1,2}
9697

9798
; opentelemetry-instrumentation-requests
9899
py3{8,9,10,11}-test-instrumentation-requests
@@ -112,9 +113,11 @@ envlist =
112113

113114
; opentelemetry-exporter-richconsole
114115
py3{8,9,10,11}-test-exporter-richconsole
116+
pypy3-test-exporter-richconsole
115117

116118
; opentelemetry-exporter-prometheus-remote-write
117-
py3{6,8,9,10}-test-exporter-prometheus-remote-write
119+
py3{6,8,9,10,11}-test-exporter-prometheus-remote-write
120+
pypy3-test-exporter-prometheus-remote-write
118121

119122
; opentelemetry-instrumentation-mysql
120123
py3{8,9,10,11}-test-instrumentation-mysql
@@ -162,9 +165,9 @@ envlist =
162165

163166
; opentelemetry-instrumentation-grpc
164167
py3{8,9,10,11}-test-instrumentation-grpc
168+
pypy3-test-instrumentation-grpc
165169

166170
; opentelemetry-instrumentation-sqlalchemy
167-
py3{7}-test-instrumentation-sqlalchemy-{11}
168171
py3{8,9,10,11}-test-instrumentation-sqlalchemy-{14}
169172
pypy3-test-instrumentation-sqlalchemy-{11,14}
170173

@@ -178,7 +181,7 @@ envlist =
178181

179182
; opentelemetry-instrumentation-celery
180183
py3{8,9,10,11}-test-instrumentation-celery
181-
; pypy3-test-instrumentation-celery
184+
pypy3-test-instrumentation-celery
182185

183186
; opentelemetry-instrumentation-sklearn
184187
py3{8}-test-instrumentation-sklearn
@@ -224,8 +227,8 @@ envlist =
224227
pypy3-test-instrumentation-kafka-python
225228

226229
; opentelemetry-instrumentation-confluent-kafka
227-
; // FIXME: Enable support for python 3.11 when https://github.com/confluentinc/confluent-kafka-python/issues/1452 is fixed
228-
py3{8,9,10}-test-instrumentation-confluent-kafka
230+
py3{8,9,10,11}-test-instrumentation-confluent-kafka
231+
pypy3-test-instrumentation-confluent-kafka
229232

230233
; opentelemetry-instrumentation-asyncio
231234
py3{8,9,10,11}-test-instrumentation-asyncio
@@ -299,7 +302,7 @@ setenv =
299302
; override CORE_REPO_SHA via env variable when testing other branches/commits than main
300303
; i.e: CORE_REPO_SHA=dde62cebffe519c35875af6d06fae053b3be65ec tox -e <env to test>
301304
CORE_REPO_SHA={env:CORE_REPO_SHA:main}
302-
CORE_REPO="git+https://github.com/open-telemetry/opentelemetry-python.git@{env:CORE_REPO_SHA}"
305+
CORE_REPO=git+https://github.com/open-telemetry/opentelemetry-python.git@{env:CORE_REPO_SHA}
303306

304307
changedir =
305308
test-distro: opentelemetry-distro/tests
@@ -363,10 +366,10 @@ commands_pre =
363366
py3{8,9,10,11}: python -m pip install -U pip setuptools wheel
364367
; Install common packages for all the tests. These are not needed in all the
365368
; cases but it saves a lot of boilerplate in this file.
366-
test: pip install "opentelemetry-api[test] @ {env:CORE_REPO}#egg=opentelemetry-api&subdirectory=opentelemetry-api"
367-
test: pip install "opentelemetry-semantic-conventions[test] @ {env:CORE_REPO}#egg=opentelemetry-semantic-conventions&subdirectory=opentelemetry-semantic-conventions"
368-
test: pip install "opentelemetry-sdk[test] @ {env:CORE_REPO}#egg=opentelemetry-sdk&subdirectory=opentelemetry-sdk"
369-
test: pip install "opentelemetry-test-utils[test] @ {env:CORE_REPO}#egg=opentelemetry-test-utils&subdirectory=tests/opentelemetry-test-utils"
369+
test: pip install opentelemetry-api[test]@{env:CORE_REPO}\#egg=opentelemetry-api&subdirectory=opentelemetry-api
370+
test: pip install opentelemetry-semantic-conventions[test]@{env:CORE_REPO}\#egg=opentelemetry-semantic-conventions&subdirectory=opentelemetry-semantic-conventions
371+
test: pip install opentelemetry-sdk[test]@{env:CORE_REPO}\#egg=opentelemetry-sdk&subdirectory=opentelemetry-sdk
372+
test: pip install opentelemetry-test-utils[test]@{env:CORE_REPO}\#egg=opentelemetry-test-utils&subdirectory=tests/opentelemetry-test-utils
370373
test: pip install {toxinidir}/opentelemetry-instrumentation
371374

372375
distro: pip install {toxinidir}/opentelemetry-distro
@@ -494,9 +497,9 @@ deps =
494497
pytest
495498

496499
commands_pre =
497-
python -m pip install "{env:CORE_REPO}#egg=opentelemetry-api&subdirectory=opentelemetry-api"
498-
python -m pip install "{env:CORE_REPO}#egg=opentelemetry-semantic-conventions&subdirectory=opentelemetry-semantic-conventions"
499-
python -m pip install "{env:CORE_REPO}#egg=opentelemetry-sdk&subdirectory=opentelemetry-sdk"
500+
python -m pip install {env:CORE_REPO}\#egg=opentelemetry-api&subdirectory=opentelemetry-api
501+
python -m pip install {env:CORE_REPO}\#egg=opentelemetry-semantic-conventions&subdirectory=opentelemetry-semantic-conventions
502+
python -m pip install {env:CORE_REPO}\#egg=opentelemetry-sdk&subdirectory=opentelemetry-sdk
500503
python -m pip install {toxinidir}/opentelemetry-instrumentation
501504
python -m pip install {toxinidir}/util/opentelemetry-util-http
502505

@@ -521,11 +524,11 @@ deps =
521524
-r dev-requirements.txt
522525

523526
commands_pre =
524-
python -m pip install "{env:CORE_REPO}#egg=opentelemetry-api&subdirectory=opentelemetry-api"
525-
python -m pip install "{env:CORE_REPO}#egg=opentelemetry-semantic-conventions&subdirectory=opentelemetry-semantic-conventions"
526-
python -m pip install "{env:CORE_REPO}#egg=opentelemetry-sdk&subdirectory=opentelemetry-sdk"
527-
python -m pip install "{env:CORE_REPO}#egg=opentelemetry-test-utils&subdirectory=tests/opentelemetry-test-utils"
528-
python -m pip install -e {toxinidir}/util/opentelemetry-util-http
527+
python -m pip install {env:CORE_REPO}\#egg=opentelemetry-api&subdirectory=opentelemetry-api
528+
python -m pip install {env:CORE_REPO}\#egg=opentelemetry-semantic-conventions&subdirectory=opentelemetry-semantic-conventions
529+
python -m pip install {env:CORE_REPO}\#egg=opentelemetry-sdk&subdirectory=opentelemetry-sdk
530+
python -m pip install {env:CORE_REPO}\#egg=opentelemetry-test-utils&subdirectory=tests/opentelemetry-test-utils
531+
python -m pip install -e {toxinidir}/util/opentelemetry-util-http[test]
529532
python -m pip install -e {toxinidir}/opentelemetry-instrumentation[test]
530533
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-wsgi[test]
531534
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-dbapi[test]
@@ -617,10 +620,10 @@ changedir =
617620
tests/opentelemetry-docker-tests/tests
618621

619622
commands_pre =
620-
pip install "{env:CORE_REPO}#egg=opentelemetry-api&subdirectory=opentelemetry-api" \
621-
"{env:CORE_REPO}#egg=opentelemetry-semantic-conventions&subdirectory=opentelemetry-semantic-conventions" \
622-
"{env:CORE_REPO}#egg=opentelemetry-sdk&subdirectory=opentelemetry-sdk" \
623-
"{env:CORE_REPO}#egg=opentelemetry-test-utils&subdirectory=tests/opentelemetry-test-utils" \
623+
pip install {env:CORE_REPO}\#egg=opentelemetry-api&subdirectory=opentelemetry-api \
624+
{env:CORE_REPO}\#egg=opentelemetry-semantic-conventions&subdirectory=opentelemetry-semantic-conventions \
625+
{env:CORE_REPO}\#egg=opentelemetry-sdk&subdirectory=opentelemetry-sdk \
626+
{env:CORE_REPO}\#egg=opentelemetry-test-utils&subdirectory=tests/opentelemetry-test-utils \
624627
-e {toxinidir}/opentelemetry-instrumentation \
625628
-e {toxinidir}/instrumentation/opentelemetry-instrumentation-asyncpg \
626629
-e {toxinidir}/instrumentation/opentelemetry-instrumentation-celery \
@@ -637,7 +640,7 @@ commands_pre =
637640
-e {toxinidir}/instrumentation/opentelemetry-instrumentation-aiopg \
638641
-e {toxinidir}/instrumentation/opentelemetry-instrumentation-redis \
639642
-e {toxinidir}/instrumentation/opentelemetry-instrumentation-remoulade \
640-
"{env:CORE_REPO}#egg=opentelemetry-exporter-opencensus&subdirectory=exporter/opentelemetry-exporter-opencensus"
643+
{env:CORE_REPO}\#egg=opentelemetry-exporter-opencensus&subdirectory=exporter/opentelemetry-exporter-opencensus
641644
docker-compose up -d
642645
python check_availability.py
643646

@@ -651,6 +654,11 @@ commands_post =
651654
deps =
652655
-r {toxinidir}/gen-requirements.txt
653656

657+
allowlist_externals =
658+
{toxinidir}/scripts/generate_instrumentation_bootstrap.py
659+
{toxinidir}/scripts/generate_instrumentation_readme.py
660+
{toxinidir}/scripts/generate_instrumentation_metapackage.py
661+
654662
commands =
655663
{toxinidir}/scripts/generate_instrumentation_bootstrap.py
656664
{toxinidir}/scripts/generate_instrumentation_readme.py

0 commit comments

Comments
 (0)