From 5b4e5d810ab36f08977579a76804472d58f9850a Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Thu, 14 Mar 2024 17:43:20 -0600 Subject: [PATCH 01/26] Remove [test] package from opentelemetry-contrib-instrumentations (#2318) Fixes #2236 --- opentelemetry-contrib-instrumentations/pyproject.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/opentelemetry-contrib-instrumentations/pyproject.toml b/opentelemetry-contrib-instrumentations/pyproject.toml index 2ed7ccec87..1cd2c37625 100644 --- a/opentelemetry-contrib-instrumentations/pyproject.toml +++ b/opentelemetry-contrib-instrumentations/pyproject.toml @@ -77,9 +77,6 @@ dependencies = [ "opentelemetry-instrumentation-wsgi==0.45b0.dev", ] -[project.optional-dependencies] -test = [] - [project.urls] Homepage = "https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/opentelemetry-contrib-instrumentations" From c54a9d1ad2436ce363df4680f3ec83369c98e5c9 Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Thu, 14 Mar 2024 17:57:38 -0600 Subject: [PATCH 02/26] Remove [test] package from aiopg instrumentation (#2243) Fixes #2185 --- .../pyproject.toml | 5 ----- .../test-requirements.txt | 22 +++++++++++++++++++ tox.ini | 6 ++--- 3 files changed, 25 insertions(+), 8 deletions(-) create mode 100644 instrumentation/opentelemetry-instrumentation-aiopg/test-requirements.txt diff --git a/instrumentation/opentelemetry-instrumentation-aiopg/pyproject.toml b/instrumentation/opentelemetry-instrumentation-aiopg/pyproject.toml index ebb88ee0ba..b6c54b658b 100644 --- a/instrumentation/opentelemetry-instrumentation-aiopg/pyproject.toml +++ b/instrumentation/opentelemetry-instrumentation-aiopg/pyproject.toml @@ -34,11 +34,6 @@ dependencies = [ instruments = [ "aiopg >= 0.13.0, < 2.0.0", ] -test = [ - "opentelemetry-instrumentation-aiopg[instruments]", - "opentelemetry-semantic-conventions == 0.45b0.dev", - "opentelemetry-test-utils == 0.45b0.dev", -] [project.entry-points.opentelemetry_instrumentor] aiopg = "opentelemetry.instrumentation.aiopg:AiopgInstrumentor" diff --git a/instrumentation/opentelemetry-instrumentation-aiopg/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-aiopg/test-requirements.txt new file mode 100644 index 0000000000..2b03677f42 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-aiopg/test-requirements.txt @@ -0,0 +1,22 @@ +aiopg==1.4.0 +asgiref==3.7.2 +async-timeout==4.0.3 +attrs==23.2.0 +Deprecated==1.2.14 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +install==1.3.5 +packaging==23.2 +pluggy==1.4.0 +psycopg2-binary==2.9.9 +py==1.11.0 +py-cpuinfo==9.0.0 +pytest==7.1.3 +pytest-benchmark==4.0.0 +tomli==2.0.1 +typing_extensions==4.10.0 +wrapt==1.16.0 +zipp==3.17.0 +-e opentelemetry-instrumentation +-e instrumentation/opentelemetry-instrumentation-dbapi +-e instrumentation/opentelemetry-instrumentation-aiopg diff --git a/tox.ini b/tox.ini index 6d74b45964..936ee920a7 100644 --- a/tox.ini +++ b/tox.ini @@ -406,7 +406,7 @@ commands_pre = aiohttp-server: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-aiohttp-server[test] - aiopg: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-dbapi pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-aiopg[test] + aiopg: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-aiopg/test-requirements.txt richconsole: pip install flaky {toxinidir}/exporter/opentelemetry-exporter-richconsole[test] @@ -563,7 +563,7 @@ commands_pre = python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-psycopg2[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-aiohttp-client[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-aiohttp-server[test] - python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-aiopg[test] + pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-aiopg/test-requirements.txt python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-sqlite3[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-pyramid[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-requests[test] @@ -597,7 +597,7 @@ commands = [testenv:docker-tests] basepython: python3 deps = - aiopg==1.1.0 + aiopg==1.4.0 amqp==5.2.0 asgiref==3.7.2 async-timeout==4.0.3 From 2417c099a0172717cc2929fda5892e37ebac461b Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Thu, 14 Mar 2024 18:07:12 -0600 Subject: [PATCH 03/26] Remove [test] package from aio-pika instrumentation (#2244) Fixes #2186 --- .../pyproject.toml | 6 ----- .../test-requirements-0.txt | 23 +++++++++++++++++++ .../test-requirements-1.txt | 23 +++++++++++++++++++ .../test-requirements-2.txt | 23 +++++++++++++++++++ tox.ini | 20 ++++++++-------- 5 files changed, 80 insertions(+), 15 deletions(-) create mode 100644 instrumentation/opentelemetry-instrumentation-aio-pika/test-requirements-0.txt create mode 100644 instrumentation/opentelemetry-instrumentation-aio-pika/test-requirements-1.txt create mode 100644 instrumentation/opentelemetry-instrumentation-aio-pika/test-requirements-2.txt diff --git a/instrumentation/opentelemetry-instrumentation-aio-pika/pyproject.toml b/instrumentation/opentelemetry-instrumentation-aio-pika/pyproject.toml index f328eab452..e79dac2866 100644 --- a/instrumentation/opentelemetry-instrumentation-aio-pika/pyproject.toml +++ b/instrumentation/opentelemetry-instrumentation-aio-pika/pyproject.toml @@ -33,12 +33,6 @@ dependencies = [ instruments = [ "aio_pika >= 7.2.0, < 10.0.0", ] -test = [ - "opentelemetry-instrumentation-aio-pika[instruments]", - "opentelemetry-test-utils == 0.45b0.dev", - "pytest", - "wrapt >= 1.0.0, < 2.0.0", -] [project.entry-points.opentelemetry_instrumentor] aio-pika = "opentelemetry.instrumentation.aio_pika:AioPikaInstrumentor" diff --git a/instrumentation/opentelemetry-instrumentation-aio-pika/test-requirements-0.txt b/instrumentation/opentelemetry-instrumentation-aio-pika/test-requirements-0.txt new file mode 100644 index 0000000000..c8ffea4e89 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-aio-pika/test-requirements-0.txt @@ -0,0 +1,23 @@ +aio-pika==7.2.0 +aiormq==6.2.3 +asgiref==3.7.2 +attrs==23.2.0 +Deprecated==1.2.14 +idna==3.6 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +multidict==6.0.5 +packaging==23.2 +pamqp==3.1.0 +pluggy==1.4.0 +py==1.11.0 +py-cpuinfo==9.0.0 +pytest==7.1.3 +pytest-benchmark==4.0.0 +tomli==2.0.1 +typing_extensions==4.9.0 +wrapt==1.16.0 +yarl==1.9.4 +zipp==3.17.0 +-e opentelemetry-instrumentation +-e instrumentation/opentelemetry-instrumentation-aio-pika diff --git a/instrumentation/opentelemetry-instrumentation-aio-pika/test-requirements-1.txt b/instrumentation/opentelemetry-instrumentation-aio-pika/test-requirements-1.txt new file mode 100644 index 0000000000..1e2ea5a1e5 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-aio-pika/test-requirements-1.txt @@ -0,0 +1,23 @@ +aio-pika==8.3.0 +aiormq==6.6.4 +asgiref==3.7.2 +attrs==23.2.0 +Deprecated==1.2.14 +idna==3.6 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +multidict==6.0.5 +packaging==23.2 +pamqp==3.2.1 +pluggy==1.4.0 +py==1.11.0 +py-cpuinfo==9.0.0 +pytest==7.1.3 +pytest-benchmark==4.0.0 +tomli==2.0.1 +typing_extensions==4.9.0 +wrapt==1.16.0 +yarl==1.9.4 +zipp==3.17.0 +-e opentelemetry-instrumentation +-e instrumentation/opentelemetry-instrumentation-aio-pika diff --git a/instrumentation/opentelemetry-instrumentation-aio-pika/test-requirements-2.txt b/instrumentation/opentelemetry-instrumentation-aio-pika/test-requirements-2.txt new file mode 100644 index 0000000000..3250c93947 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-aio-pika/test-requirements-2.txt @@ -0,0 +1,23 @@ +aio-pika==9.4.0 +aiormq==6.8.0 +asgiref==3.7.2 +attrs==23.2.0 +Deprecated==1.2.14 +idna==3.6 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +multidict==6.0.5 +packaging==23.2 +pamqp==3.3.0 +pluggy==1.4.0 +py==1.11.0 +py-cpuinfo==9.0.0 +pytest==7.1.3 +pytest-benchmark==4.0.0 +tomli==2.0.1 +typing_extensions==4.9.0 +wrapt==1.16.0 +yarl==1.9.4 +zipp==3.17.0 +-e opentelemetry-instrumentation +-e instrumentation/opentelemetry-instrumentation-aio-pika diff --git a/tox.ini b/tox.ini index 936ee920a7..5b7fe73aa8 100644 --- a/tox.ini +++ b/tox.ini @@ -223,8 +223,13 @@ envlist = pypy3-test-instrumentation-sio-pika-{0,1} ; opentelemetry-instrumentation-aio-pika - py3{8,9,10,11}-test-instrumentation-aio-pika-{8,9} - pypy3-test-instrumentation-aio-pika-{8,9} + ; The numbers at the end of the environment names + ; below mean these dependencies are being used: + ; 0: aio_pika~=7.2.0 + ; 1: aio_pika>=8.0.0,<9.0.0 + ; 2: aio_pika>=9.0.0,<10.0.0 + py3{8,9,10,11}-test-instrumentation-aio-pika-{0,1,2} + pypy3-test-instrumentation-aio-pika-{0,1,2} ; opentelemetry-instrumentation-kafka-python py3{8,9,10,11}-test-instrumentation-kafka-python @@ -284,9 +289,6 @@ deps = sqlalchemy-14: sqlalchemy~=1.4 sio-pika-0: pika>=0.12.0,<1.0.0 sio-pika-1: pika>=1.0.0 - aio-pika-7: aio_pika~=7.2.0 - aio-pika-8: aio_pika>=8.0.0,<9.0.0 - aio-pika-9: aio_pika>=9.0.0,<10.0.0 pymemcache-135: pymemcache ==1.3.5 pymemcache-200: pymemcache >2.0.0,<3.0.0 pymemcache-300: pymemcache >3.0.0,<3.4.2 @@ -325,7 +327,9 @@ commands_pre = sio-pika-{0,1}: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-pika[test] - aio-pika-{8,9}: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-aio-pika[test] + aio-pika-0: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-aio-pika/test-requirements-0.txt + aio-pika-1: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-aio-pika/test-requirements-1.txt + aio-pika-2: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-aio-pika/test-requirements-2.txt kafka-python: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-kafka-python[test] @@ -400,8 +404,6 @@ commands_pre = logging: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-logging[test] - aio-pika-{8,9}: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-aio-pika[test] - aiohttp-client: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-aiohttp-client[test] aiohttp-server: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-aiohttp-server[test] @@ -549,7 +551,7 @@ commands_pre = python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-cassandra[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-celery[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-pika[test] - python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-aio-pika[test] + pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-aio-pika/test-requirements-2.txt ; python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-sklearn[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-redis[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-remoulade[test] From 1bf9f429e4b8b710762f06cb3a8e738e1fe76667 Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Thu, 14 Mar 2024 18:18:52 -0600 Subject: [PATCH 04/26] Remove [test] package from asgi instrumentation (#2247) Fixes #2187 --- .../pyproject.toml | 4 ---- .../test-requirements.txt | 18 ++++++++++++++++++ tox.ini | 8 +++++--- 3 files changed, 23 insertions(+), 7 deletions(-) create mode 100644 instrumentation/opentelemetry-instrumentation-asgi/test-requirements.txt diff --git a/instrumentation/opentelemetry-instrumentation-asgi/pyproject.toml b/instrumentation/opentelemetry-instrumentation-asgi/pyproject.toml index d642a07e48..81c83b07e9 100644 --- a/instrumentation/opentelemetry-instrumentation-asgi/pyproject.toml +++ b/instrumentation/opentelemetry-instrumentation-asgi/pyproject.toml @@ -35,10 +35,6 @@ dependencies = [ instruments = [ "asgiref ~= 3.0", ] -test = [ - "opentelemetry-instrumentation-asgi[instruments]", - "opentelemetry-test-utils == 0.45b0.dev", -] [project.urls] Homepage = "https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation/opentelemetry-instrumentation-asgi" diff --git a/instrumentation/opentelemetry-instrumentation-asgi/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-asgi/test-requirements.txt new file mode 100644 index 0000000000..f3ee9764cf --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-asgi/test-requirements.txt @@ -0,0 +1,18 @@ +asgiref==3.7.2 +attrs==23.2.0 +Deprecated==1.2.14 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +packaging==23.2 +pluggy==1.4.0 +py==1.11.0 +py-cpuinfo==9.0.0 +pytest==7.1.3 +pytest-benchmark==4.0.0 +tomli==2.0.1 +typing_extensions==4.9.0 +wrapt==1.16.0 +zipp==3.17.0 +-e opentelemetry-instrumentation +-e util/opentelemetry-util-http +-e instrumentation/opentelemetry-instrumentation-asgi diff --git a/tox.ini b/tox.ini index 5b7fe73aa8..6e18132202 100644 --- a/tox.ini +++ b/tox.ini @@ -323,6 +323,8 @@ commands_pre = distro: pip install {toxinidir}/opentelemetry-distro + asgi: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-asgi/test-requirements.txt + celery: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-celery[test] sio-pika-{0,1}: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-pika[test] @@ -337,9 +339,9 @@ commands_pre = grpc: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-grpc[test] - falcon-{1,2,3},flask-{213,220,300},django-{1,2,3,4},pyramid,tornado,starlette,fastapi,aiohttp,asgi,httpx-{18,21},requests,urllib,urllib3v-{1,2},wsgi: pip install {toxinidir}/util/opentelemetry-util-http + falcon-{1,2,3},flask-{213,220,300},django-{1,2,3,4},pyramid,tornado,starlette,fastapi,aiohttp,httpx-{18,21},requests,urllib,urllib3v-{1,2},wsgi: pip install {toxinidir}/util/opentelemetry-util-http wsgi,falcon-{1,2,3},flask-{213,220,300},django-{1,2,3,4},pyramid: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-wsgi[test] - asgi,django-{3,4},starlette,fastapi: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-asgi[test] + django-{3,4},starlette,fastapi: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-asgi asyncpg: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-asyncpg[test] @@ -538,7 +540,7 @@ commands_pre = python -m pip install -e {toxinidir}/opentelemetry-instrumentation[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-wsgi[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-dbapi[test] - python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-asgi[test] + pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-asgi/test-requirements.txt python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-botocore[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-boto3sqs[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-django[test] From 5552db2adfbd18fd3232dee8047d366a19d4df7b Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Thu, 14 Mar 2024 18:32:23 -0600 Subject: [PATCH 05/26] Remove [test] package from asyncio instrumentation (#2248) Fixes #2188 --- .../pyproject.toml | 6 ------ .../test-requirements.txt | 18 ++++++++++++++++++ tox.ini | 4 ++-- 3 files changed, 20 insertions(+), 8 deletions(-) create mode 100644 instrumentation/opentelemetry-instrumentation-asyncio/test-requirements.txt diff --git a/instrumentation/opentelemetry-instrumentation-asyncio/pyproject.toml b/instrumentation/opentelemetry-instrumentation-asyncio/pyproject.toml index 358fbefeb4..5354ea3cb4 100644 --- a/instrumentation/opentelemetry-instrumentation-asyncio/pyproject.toml +++ b/instrumentation/opentelemetry-instrumentation-asyncio/pyproject.toml @@ -33,12 +33,6 @@ dependencies = [ [project.optional-dependencies] instruments = [] -test = [ - "opentelemetry-instrumentation-asyncio[instruments]", - "pytest", - "wrapt >= 1.0.0, < 2.0.0", - "pytest-asyncio", -] [project.entry-points.opentelemetry_instrumentor] asyncio = "opentelemetry.instrumentation.asyncio:AsyncioInstrumentor" diff --git a/instrumentation/opentelemetry-instrumentation-asyncio/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-asyncio/test-requirements.txt new file mode 100644 index 0000000000..14f724888b --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-asyncio/test-requirements.txt @@ -0,0 +1,18 @@ +asgiref==3.7.2 +attrs==23.2.0 +Deprecated==1.2.14 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +packaging==23.2 +pluggy==1.4.0 +py==1.11.0 +py-cpuinfo==9.0.0 +pytest==7.1.3 +pytest-asyncio==0.23.5 +pytest-benchmark==4.0.0 +tomli==2.0.1 +typing_extensions==4.9.0 +wrapt==1.16.0 +zipp==3.17.0 +-e opentelemetry-instrumentation +-e instrumentation/opentelemetry-instrumentation-asyncio diff --git a/tox.ini b/tox.ini index 6e18132202..3250a5be3c 100644 --- a/tox.ini +++ b/tox.ini @@ -422,7 +422,7 @@ commands_pre = elasticsearch-{2,5,6}: pip install {toxinidir}/opentelemetry-instrumentation[test] {toxinidir}/instrumentation/opentelemetry-instrumentation-elasticsearch[test] - asyncio: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-asyncio[test] + asyncio: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-asyncio/test-requirements.txt httpx-{18,21}: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-httpx[test] @@ -586,7 +586,7 @@ commands_pre = python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-httpx[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-aws-lambda[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-system-metrics[test] - python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-asyncio[test] + pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-asyncio/test-requirements.txt python -m pip install -e {toxinidir}/exporter/opentelemetry-exporter-richconsole[test] # requires snappy headers to be available on the system python -m pip install -e {toxinidir}/sdk-extension/opentelemetry-sdk-extension-aws[test] From d948f21ad32fb9fde0b1193abc1b7acf28539d4a Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Thu, 14 Mar 2024 18:42:46 -0600 Subject: [PATCH 06/26] Remove [test] package from flask instrumentation (#2127) Fixes #2126 --- .../pyproject.toml | 5 ---- .../test-requirements-0.txt | 25 +++++++++++++++++ .../test-requirements-1.txt | 25 +++++++++++++++++ .../test-requirements-2.txt | 26 ++++++++++++++++++ tox.ini | 27 ++++++++++--------- 5 files changed, 90 insertions(+), 18 deletions(-) create mode 100644 instrumentation/opentelemetry-instrumentation-flask/test-requirements-0.txt create mode 100644 instrumentation/opentelemetry-instrumentation-flask/test-requirements-1.txt create mode 100644 instrumentation/opentelemetry-instrumentation-flask/test-requirements-2.txt diff --git a/instrumentation/opentelemetry-instrumentation-flask/pyproject.toml b/instrumentation/opentelemetry-instrumentation-flask/pyproject.toml index c8e8b48185..8e0dd1f858 100644 --- a/instrumentation/opentelemetry-instrumentation-flask/pyproject.toml +++ b/instrumentation/opentelemetry-instrumentation-flask/pyproject.toml @@ -37,11 +37,6 @@ dependencies = [ instruments = [ "flask >= 1.0", ] -test = [ - "opentelemetry-instrumentation-flask[instruments]", - "markupsafe==2.1.2", - "opentelemetry-test-utils == 0.45b0.dev", -] [project.entry-points.opentelemetry_instrumentor] flask = "opentelemetry.instrumentation.flask:FlaskInstrumentor" diff --git a/instrumentation/opentelemetry-instrumentation-flask/test-requirements-0.txt b/instrumentation/opentelemetry-instrumentation-flask/test-requirements-0.txt new file mode 100644 index 0000000000..fbefeebdb4 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-flask/test-requirements-0.txt @@ -0,0 +1,25 @@ +asgiref==3.7.2 +attrs==23.2.0 +click==8.1.7 +Deprecated==1.2.14 +Flask==2.1.3 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +itsdangerous==2.1.2 +Jinja2==3.1.3 +MarkupSafe==2.1.2 +packaging==23.2 +pluggy==1.4.0 +py==1.11.0 +py-cpuinfo==9.0.0 +pytest==7.1.3 +pytest-benchmark==4.0.0 +tomli==2.0.1 +typing_extensions==4.9.0 +Werkzeug==2.3.8 +wrapt==1.16.0 +zipp==3.17.0 +-e opentelemetry-instrumentation +-e instrumentation/opentelemetry-instrumentation-wsgi +-e util/opentelemetry-util-http +-e instrumentation/opentelemetry-instrumentation-flask diff --git a/instrumentation/opentelemetry-instrumentation-flask/test-requirements-1.txt b/instrumentation/opentelemetry-instrumentation-flask/test-requirements-1.txt new file mode 100644 index 0000000000..41583ad7f9 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-flask/test-requirements-1.txt @@ -0,0 +1,25 @@ +asgiref==3.7.2 +attrs==23.2.0 +click==8.1.7 +Deprecated==1.2.14 +Flask==2.2.0 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +itsdangerous==2.1.2 +Jinja2==3.1.3 +MarkupSafe==2.1.2 +packaging==23.2 +pluggy==1.4.0 +py==1.11.0 +py-cpuinfo==9.0.0 +pytest==7.1.3 +pytest-benchmark==4.0.0 +tomli==2.0.1 +typing_extensions==4.9.0 +Werkzeug==2.3.8 +wrapt==1.16.0 +zipp==3.17.0 +-e opentelemetry-instrumentation +-e instrumentation/opentelemetry-instrumentation-wsgi +-e util/opentelemetry-util-http +-e instrumentation/opentelemetry-instrumentation-flask diff --git a/instrumentation/opentelemetry-instrumentation-flask/test-requirements-2.txt b/instrumentation/opentelemetry-instrumentation-flask/test-requirements-2.txt new file mode 100644 index 0000000000..3a89328861 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-flask/test-requirements-2.txt @@ -0,0 +1,26 @@ +asgiref==3.7.2 +attrs==23.2.0 +blinker==1.7.0 +click==8.1.7 +Deprecated==1.2.14 +Flask==3.0.2 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +itsdangerous==2.1.2 +Jinja2==3.1.3 +MarkupSafe==2.1.2 +packaging==23.2 +pluggy==1.4.0 +py==1.11.0 +py-cpuinfo==9.0.0 +pytest==7.1.3 +pytest-benchmark==4.0.0 +tomli==2.0.1 +typing_extensions==4.9.0 +Werkzeug==3.0.1 +wrapt==1.16.0 +zipp==3.17.0 +-e opentelemetry-instrumentation +-e instrumentation/opentelemetry-instrumentation-wsgi +-e util/opentelemetry-util-http +-e instrumentation/opentelemetry-instrumentation-flask diff --git a/tox.ini b/tox.ini index 3250a5be3c..d61f050571 100644 --- a/tox.ini +++ b/tox.ini @@ -83,9 +83,14 @@ envlist = pypy3-test-instrumentation-fastapi ; opentelemetry-instrumentation-flask - py3{8,9,10,11}-test-instrumentation-flask-{213,220} - py3{8,9,10,11}-test-instrumentation-flask-{300} - pypy3-test-instrumentation-flask-{213,220} + ; The numbers at the end of the environment names + ; below mean these dependencies are being used: + ; 0: Flask ==2.1.3 Werkzeug <3.0.0 + ; 1: Flask ==2.2.0 Werkzeug <3.0.0 + ; 2: Flask >=3.0.0 Werkzeug >=3.0.0 + py3{8,9,10,11}-test-instrumentation-flask-{0,1} + py3{8,9,10,11}-test-instrumentation-flask-{2} + pypy3-test-instrumentation-flask-{0,1} ; opentelemetry-instrumentation-urllib py3{8,9,10,11}-test-instrumentation-urllib @@ -277,12 +282,6 @@ deps = falcon-1: falcon ==1.4.1 falcon-2: falcon >=2.0.0,<3.0.0 falcon-3: falcon >=3.0.0,<4.0.0 - flask-213: Flask ==2.1.3 - flask-213: Werkzeug <3.0.0 - flask-220: Flask ==2.2.0 - flask-220: Werkzeug <3.0.0 - flask-300: Flask >=3.0.0 - flask-300: Werkzeug >=3.0.0 grpc: pytest-asyncio sqlalchemy-11: sqlalchemy>=1.1,<1.2 sqlalchemy-14: aiosqlite @@ -339,8 +338,8 @@ commands_pre = grpc: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-grpc[test] - falcon-{1,2,3},flask-{213,220,300},django-{1,2,3,4},pyramid,tornado,starlette,fastapi,aiohttp,httpx-{18,21},requests,urllib,urllib3v-{1,2},wsgi: pip install {toxinidir}/util/opentelemetry-util-http - wsgi,falcon-{1,2,3},flask-{213,220,300},django-{1,2,3,4},pyramid: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-wsgi[test] + falcon-{1,2,3},django-{1,2,3,4},pyramid,tornado,starlette,fastapi,aiohttp,httpx-{18,21},requests,urllib,urllib3v-{1,2},wsgi: pip install {toxinidir}/util/opentelemetry-util-http + wsgi,falcon-{1,2,3},django-{1,2,3,4},pyramid: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-wsgi[test] django-{3,4},starlette,fastapi: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-asgi asyncpg: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-asyncpg[test] @@ -354,7 +353,9 @@ commands_pre = falcon-{1,2,3}: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-falcon[test] - flask-{213,220,300}: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-flask[test] + flask-0: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-flask/test-requirements-0.txt + flask-1: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-flask/test-requirements-1.txt + flask-2: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-flask/test-requirements-2.txt urllib: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib[test] @@ -548,7 +549,7 @@ commands_pre = python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-grpc[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-falcon[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-boto[test] - python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-flask[test] + pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-flask/test-requirements-2.txt python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-sqlalchemy[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-cassandra[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-celery[test] From 5f68e9701bed6a12b90100595839690c04dc8d5d Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Thu, 14 Mar 2024 18:54:12 -0600 Subject: [PATCH 07/26] Remove [test] package for django instrumentation (#2311) Fixes #2198 --- .../pyproject.toml | 4 --- .../test-requirements-0.txt | 22 +++++++++++++ .../test-requirements-1.txt | 23 +++++++++++++ .../test-requirements-2.txt | 23 +++++++++++++ .../test-requirements-3.txt | 22 +++++++++++++ tox.ini | 33 ++++++++++++------- 6 files changed, 112 insertions(+), 15 deletions(-) create mode 100644 instrumentation/opentelemetry-instrumentation-django/test-requirements-0.txt create mode 100644 instrumentation/opentelemetry-instrumentation-django/test-requirements-1.txt create mode 100644 instrumentation/opentelemetry-instrumentation-django/test-requirements-2.txt create mode 100644 instrumentation/opentelemetry-instrumentation-django/test-requirements-3.txt diff --git a/instrumentation/opentelemetry-instrumentation-django/pyproject.toml b/instrumentation/opentelemetry-instrumentation-django/pyproject.toml index 50cc227e44..65be04cb69 100644 --- a/instrumentation/opentelemetry-instrumentation-django/pyproject.toml +++ b/instrumentation/opentelemetry-instrumentation-django/pyproject.toml @@ -38,10 +38,6 @@ asgi = [ instruments = [ "django >= 1.10", ] -test = [ - "opentelemetry-instrumentation-django[instruments]", - "opentelemetry-test-utils == 0.45b0.dev", -] [project.entry-points.opentelemetry_instrumentor] django = "opentelemetry.instrumentation.django:DjangoInstrumentor" diff --git a/instrumentation/opentelemetry-instrumentation-django/test-requirements-0.txt b/instrumentation/opentelemetry-instrumentation-django/test-requirements-0.txt new file mode 100644 index 0000000000..6dce957000 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-django/test-requirements-0.txt @@ -0,0 +1,22 @@ +asgiref==3.7.2 +attrs==23.2.0 +Deprecated==1.2.14 +Django==2.2.28 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +packaging==23.2 +pluggy==1.4.0 +py==1.11.0 +py-cpuinfo==9.0.0 +pytest==7.1.3 +pytest-benchmark==4.0.0 +pytz==2024.1 +sqlparse==0.4.4 +tomli==2.0.1 +typing_extensions==4.10.0 +wrapt==1.16.0 +zipp==3.17.0 +-e opentelemetry-instrumentation +-e instrumentation/opentelemetry-instrumentation-wsgi +-e util/opentelemetry-util-http +-e instrumentation/opentelemetry-instrumentation-django diff --git a/instrumentation/opentelemetry-instrumentation-django/test-requirements-1.txt b/instrumentation/opentelemetry-instrumentation-django/test-requirements-1.txt new file mode 100644 index 0000000000..116dc015ec --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-django/test-requirements-1.txt @@ -0,0 +1,23 @@ +asgiref==3.7.2 +attrs==23.2.0 +Deprecated==1.2.14 +Django==3.2.24 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +packaging==23.2 +pluggy==1.4.0 +py==1.11.0 +py-cpuinfo==9.0.0 +pytest==7.1.3 +pytest-benchmark==4.0.0 +pytz==2024.1 +sqlparse==0.4.4 +tomli==2.0.1 +typing_extensions==4.10.0 +wrapt==1.16.0 +zipp==3.17.0 +-e opentelemetry-instrumentation +-e instrumentation/opentelemetry-instrumentation-wsgi +-e instrumentation/opentelemetry-instrumentation-asgi +-e util/opentelemetry-util-http +-e instrumentation/opentelemetry-instrumentation-django diff --git a/instrumentation/opentelemetry-instrumentation-django/test-requirements-2.txt b/instrumentation/opentelemetry-instrumentation-django/test-requirements-2.txt new file mode 100644 index 0000000000..ac3b40e16b --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-django/test-requirements-2.txt @@ -0,0 +1,23 @@ +asgiref==3.7.2 +attrs==23.2.0 +backports.zoneinfo==0.2.1 +Deprecated==1.2.14 +Django==4.2.10 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +packaging==23.2 +pluggy==1.4.0 +py==1.11.0 +py-cpuinfo==9.0.0 +pytest==7.1.3 +pytest-benchmark==4.0.0 +sqlparse==0.4.4 +tomli==2.0.1 +typing_extensions==4.10.0 +wrapt==1.16.0 +zipp==3.17.0 +-e opentelemetry-instrumentation +-e instrumentation/opentelemetry-instrumentation-wsgi +-e instrumentation/opentelemetry-instrumentation-asgi +-e util/opentelemetry-util-http +-e instrumentation/opentelemetry-instrumentation-django diff --git a/instrumentation/opentelemetry-instrumentation-django/test-requirements-3.txt b/instrumentation/opentelemetry-instrumentation-django/test-requirements-3.txt new file mode 100644 index 0000000000..3bb32c4c6b --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-django/test-requirements-3.txt @@ -0,0 +1,22 @@ +asgiref==3.7.2 +attrs==23.2.0 +Deprecated==1.2.14 +Django==4.2.10 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +packaging==23.2 +pluggy==1.4.0 +py==1.11.0 +py-cpuinfo==9.0.0 +pytest==7.1.3 +pytest-benchmark==4.0.0 +sqlparse==0.4.4 +tomli==2.0.1 +typing_extensions==4.10.0 +wrapt==1.16.0 +zipp==3.17.0 +-e opentelemetry-instrumentation +-e instrumentation/opentelemetry-instrumentation-wsgi +-e instrumentation/opentelemetry-instrumentation-asgi +-e util/opentelemetry-util-http +-e instrumentation/opentelemetry-instrumentation-django diff --git a/tox.ini b/tox.ini index d61f050571..411f73f2f3 100644 --- a/tox.ini +++ b/tox.ini @@ -52,10 +52,18 @@ envlist = ; Only officially supported Python versions are tested for each Django ; major release. Updated list can be found at: ; https://docs.djangoproject.com/en/dev/faq/install/#what-python-version-can-i-use-with-django + ; The numbers at the end of the environment names + ; below mean these dependencies are being used: + ; 0: django~=2.0 + ; 1: django~=3.0 + ; 2: django>=4.0b1,<5.0 backports.zoneinfo==0.2.1 + ; 3: django>=4.0b1,<5.0 + py3{8,9}-test-instrumentation-django-0 + py3{8,9}-test-instrumentation-django-1 py3{8,9}-test-instrumentation-django-2 - py3{8,9,10,11}-test-instrumentation-django-3 - py3{8,9,10,11}-test-instrumentation-django-4 - pypy3-test-instrumentation-django-{2,3} + py3{10,11}-test-instrumentation-django-1 + py3{10,11}-test-instrumentation-django-3 + pypy3-test-instrumentation-django-{0,1} ; opentelemetry-instrumentation-dbapi py3{8,9,10,11}-test-instrumentation-dbapi @@ -265,9 +273,6 @@ deps = test: pytest-benchmark coverage: pytest coverage: pytest-cov - django-2: django~=2.0 - django-3: django~=3.0 - django-4: django>=4.0b1,<5.0 elasticsearch-2: elasticsearch-dsl>=2.0,<3.0 elasticsearch-2: elasticsearch>=2.0,<3.0 elasticsearch-5: elasticsearch-dsl>=5.0,<6.0 @@ -338,9 +343,9 @@ commands_pre = grpc: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-grpc[test] - falcon-{1,2,3},django-{1,2,3,4},pyramid,tornado,starlette,fastapi,aiohttp,httpx-{18,21},requests,urllib,urllib3v-{1,2},wsgi: pip install {toxinidir}/util/opentelemetry-util-http - wsgi,falcon-{1,2,3},django-{1,2,3,4},pyramid: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-wsgi[test] - django-{3,4},starlette,fastapi: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-asgi + falcon-{1,2,3},pyramid,tornado,starlette,fastapi,aiohttp,httpx-{18,21},requests,urllib,urllib3v-{1,2},wsgi: pip install {toxinidir}/util/opentelemetry-util-http + wsgi,falcon-{1,2,3},pyramid: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-wsgi[test] + starlette,fastapi: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-asgi asyncpg: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-asyncpg[test] @@ -367,7 +372,13 @@ commands_pre = dbapi: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-dbapi[test] - django-{1,2,3,4}: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-django[test] + py3{8,9}-test-instrumentation-django-0: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-django/test-requirements-0.txt + py3{8,9}-test-instrumentation-django-1: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-django/test-requirements-1.txt + py3{8,9}-test-instrumentation-django-2: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-django/test-requirements-2.txt + py3{10,11}-test-instrumentation-django-1: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-django/test-requirements-1.txt + py3{10,11}-test-instrumentation-django-3: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-django/test-requirements-3.txt + pypy3-test-instrumentation-django-0: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-django/test-requirements-0.txt + pypy3-test-instrumentation-django-1: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-django/test-requirements-1.txt fastapi: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-fastapi[test] @@ -544,7 +555,7 @@ commands_pre = pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-asgi/test-requirements.txt python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-botocore[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-boto3sqs[test] - python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-django[test] + pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-django/test-requirements-3.txt python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-starlette[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-grpc[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-falcon[test] From ce2de1f5a933f66b9c72fe293a04dde39a368eb7 Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Thu, 14 Mar 2024 19:05:44 -0600 Subject: [PATCH 08/26] Remove [test] package from falcon instrumentation (#2313) Fixes #2200 --- .../pyproject.toml | 4 ---- .../test-requirements-0.txt | 22 +++++++++++++++++ .../test-requirements-1.txt | 20 ++++++++++++++++ .../test-requirements-2.txt | 20 ++++++++++++++++ tox.ini | 24 +++++++++++-------- 5 files changed, 76 insertions(+), 14 deletions(-) create mode 100644 instrumentation/opentelemetry-instrumentation-falcon/test-requirements-0.txt create mode 100644 instrumentation/opentelemetry-instrumentation-falcon/test-requirements-1.txt create mode 100644 instrumentation/opentelemetry-instrumentation-falcon/test-requirements-2.txt diff --git a/instrumentation/opentelemetry-instrumentation-falcon/pyproject.toml b/instrumentation/opentelemetry-instrumentation-falcon/pyproject.toml index 1e4b5e5254..dab9534bf9 100644 --- a/instrumentation/opentelemetry-instrumentation-falcon/pyproject.toml +++ b/instrumentation/opentelemetry-instrumentation-falcon/pyproject.toml @@ -36,10 +36,6 @@ dependencies = [ instruments = [ "falcon >= 1.4.1, < 3.1.2", ] -test = [ - "opentelemetry-instrumentation-falcon[instruments]", - "opentelemetry-test-utils == 0.45b0.dev", -] [project.entry-points.opentelemetry_instrumentor] falcon = "opentelemetry.instrumentation.falcon:FalconInstrumentor" diff --git a/instrumentation/opentelemetry-instrumentation-falcon/test-requirements-0.txt b/instrumentation/opentelemetry-instrumentation-falcon/test-requirements-0.txt new file mode 100644 index 0000000000..31c7f1d7c8 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-falcon/test-requirements-0.txt @@ -0,0 +1,22 @@ +asgiref==3.7.2 +attrs==23.2.0 +Deprecated==1.2.14 +falcon==1.4.1 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +packaging==23.2 +pluggy==1.4.0 +py==1.11.0 +py-cpuinfo==9.0.0 +pytest==7.1.3 +pytest-benchmark==4.0.0 +python-mimeparse==1.6.0 +six==1.16.0 +tomli==2.0.1 +typing_extensions==4.10.0 +wrapt==1.16.0 +zipp==3.17.0 +-e opentelemetry-instrumentation +-e instrumentation/opentelemetry-instrumentation-wsgi +-e util/opentelemetry-util-http +-e instrumentation/opentelemetry-instrumentation-falcon diff --git a/instrumentation/opentelemetry-instrumentation-falcon/test-requirements-1.txt b/instrumentation/opentelemetry-instrumentation-falcon/test-requirements-1.txt new file mode 100644 index 0000000000..ad476d7c22 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-falcon/test-requirements-1.txt @@ -0,0 +1,20 @@ +asgiref==3.7.2 +attrs==23.2.0 +Deprecated==1.2.14 +falcon==2.0.0 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +packaging==23.2 +pluggy==1.4.0 +py==1.11.0 +py-cpuinfo==9.0.0 +pytest==7.1.3 +pytest-benchmark==4.0.0 +tomli==2.0.1 +typing_extensions==4.10.0 +wrapt==1.16.0 +zipp==3.17.0 +-e opentelemetry-instrumentation +-e instrumentation/opentelemetry-instrumentation-wsgi +-e util/opentelemetry-util-http +-e instrumentation/opentelemetry-instrumentation-falcon diff --git a/instrumentation/opentelemetry-instrumentation-falcon/test-requirements-2.txt b/instrumentation/opentelemetry-instrumentation-falcon/test-requirements-2.txt new file mode 100644 index 0000000000..6c5c3e8ac9 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-falcon/test-requirements-2.txt @@ -0,0 +1,20 @@ +asgiref==3.7.2 +attrs==23.2.0 +Deprecated==1.2.14 +falcon==3.1.1 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +packaging==23.2 +pluggy==1.4.0 +py==1.11.0 +py-cpuinfo==9.0.0 +pytest==7.1.3 +pytest-benchmark==4.0.0 +tomli==2.0.1 +typing_extensions==4.10.0 +wrapt==1.16.0 +zipp==3.17.0 +-e opentelemetry-instrumentation +-e instrumentation/opentelemetry-instrumentation-wsgi +-e util/opentelemetry-util-http +-e instrumentation/opentelemetry-instrumentation-falcon diff --git a/tox.ini b/tox.ini index 411f73f2f3..8ba4d6722d 100644 --- a/tox.ini +++ b/tox.ini @@ -82,9 +82,14 @@ envlist = ; opentelemetry-instrumentation-falcon ; py310 does not work with falcon 1 - py3{8,9}-test-instrumentation-falcon-1 - py3{8,9,10,11}-test-instrumentation-falcon-{2,3} - pypy3-test-instrumentation-falcon-{1,2,3} + ; The numbers at the end of the environment names + ; below mean these dependencies are being used: + ; 0: falcon ==1.4.1 + ; 1: falcon >=2.0.0,<3.0.0 + ; 2: falcon >=3.0.0,<4.0.0 + py3{8,9}-test-instrumentation-falcon-0 + py3{8,9,10,11}-test-instrumentation-falcon-{1,2} + pypy3-test-instrumentation-falcon-{0,1,2} ; opentelemetry-instrumentation-fastapi py3{8,9,10,11}-test-instrumentation-fastapi @@ -284,9 +289,6 @@ deps = ; elasticsearch-7: elasticsearch>=7.0,<8.0 ; elasticsearch-8: elasticsearch-dsl>=8.0,<9.0 ; elasticsearch-8: elasticsearch>=8.0,<9.0 - falcon-1: falcon ==1.4.1 - falcon-2: falcon >=2.0.0,<3.0.0 - falcon-3: falcon >=3.0.0,<4.0.0 grpc: pytest-asyncio sqlalchemy-11: sqlalchemy>=1.1,<1.2 sqlalchemy-14: aiosqlite @@ -343,8 +345,8 @@ commands_pre = grpc: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-grpc[test] - falcon-{1,2,3},pyramid,tornado,starlette,fastapi,aiohttp,httpx-{18,21},requests,urllib,urllib3v-{1,2},wsgi: pip install {toxinidir}/util/opentelemetry-util-http - wsgi,falcon-{1,2,3},pyramid: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-wsgi[test] + pyramid,tornado,starlette,fastapi,aiohttp,httpx-{18,21},requests,urllib,urllib3v-{1,2},wsgi: pip install {toxinidir}/util/opentelemetry-util-http + wsgi,pyramid: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-wsgi[test] starlette,fastapi: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-asgi asyncpg: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-asyncpg[test] @@ -356,7 +358,9 @@ commands_pre = boto3sqs: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-boto3sqs[test] - falcon-{1,2,3}: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-falcon[test] + falcon-0: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-falcon/test-requirements-0.txt + falcon-1: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-falcon/test-requirements-1.txt + falcon-2: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-falcon/test-requirements-2.txt flask-0: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-flask/test-requirements-0.txt flask-1: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-flask/test-requirements-1.txt @@ -558,7 +562,7 @@ commands_pre = pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-django/test-requirements-3.txt python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-starlette[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-grpc[test] - python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-falcon[test] + pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-falcon/test-requirements-2.txt python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-boto[test] pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-flask/test-requirements-2.txt python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-sqlalchemy[test] From ba05c2c0c33297c08eb98d87742b68c48b09f10f Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Thu, 14 Mar 2024 19:15:50 -0600 Subject: [PATCH 09/26] Remove [test] package from wsgi instrumentation (#2283) Fixes #2227 --- .../pyproject.toml | 3 --- .../test-requirements.txt | 18 ++++++++++++++++++ tox.ini | 8 +++++--- 3 files changed, 23 insertions(+), 6 deletions(-) create mode 100644 instrumentation/opentelemetry-instrumentation-wsgi/test-requirements.txt diff --git a/instrumentation/opentelemetry-instrumentation-wsgi/pyproject.toml b/instrumentation/opentelemetry-instrumentation-wsgi/pyproject.toml index bb1b6ef286..69b0e7ff41 100644 --- a/instrumentation/opentelemetry-instrumentation-wsgi/pyproject.toml +++ b/instrumentation/opentelemetry-instrumentation-wsgi/pyproject.toml @@ -32,9 +32,6 @@ dependencies = [ [project.optional-dependencies] instruments = [] -test = [ - "opentelemetry-test-utils == 0.45b0.dev", -] [project.urls] Homepage = "https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation/opentelemetry-instrumentation-wsgi" diff --git a/instrumentation/opentelemetry-instrumentation-wsgi/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-wsgi/test-requirements.txt new file mode 100644 index 0000000000..a4910352ed --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-wsgi/test-requirements.txt @@ -0,0 +1,18 @@ +asgiref==3.7.2 +attrs==23.2.0 +Deprecated==1.2.14 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +packaging==23.2 +pluggy==1.4.0 +py==1.11.0 +py-cpuinfo==9.0.0 +pytest==7.1.3 +pytest-benchmark==4.0.0 +tomli==2.0.1 +typing_extensions==4.9.0 +wrapt==1.16.0 +zipp==3.17.0 +-e opentelemetry-instrumentation +-e util/opentelemetry-util-http +-e instrumentation/opentelemetry-instrumentation-wsgi diff --git a/tox.ini b/tox.ini index 8ba4d6722d..e1d78919bc 100644 --- a/tox.ini +++ b/tox.ini @@ -345,10 +345,12 @@ commands_pre = grpc: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-grpc[test] - pyramid,tornado,starlette,fastapi,aiohttp,httpx-{18,21},requests,urllib,urllib3v-{1,2},wsgi: pip install {toxinidir}/util/opentelemetry-util-http - wsgi,pyramid: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-wsgi[test] + pyramid,tornado,starlette,fastapi,aiohttp,httpx-{18,21},requests,urllib,urllib3v-{1,2}: pip install {toxinidir}/util/opentelemetry-util-http + pyramid: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-wsgi starlette,fastapi: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-asgi + wsgi: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-wsgi/test-requirements.txt + asyncpg: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-asyncpg[test] aws-lambda: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-aws-lambda[test] @@ -554,7 +556,7 @@ commands_pre = python -m pip install {env:CORE_REPO}\#egg=opentelemetry-test-utils&subdirectory=tests/opentelemetry-test-utils python -m pip install -e {toxinidir}/util/opentelemetry-util-http[test] python -m pip install -e {toxinidir}/opentelemetry-instrumentation[test] - python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-wsgi[test] + pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-wsgi/test-requirements.txt python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-dbapi[test] pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-asgi/test-requirements.txt python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-botocore[test] From e56cdc8feca09d611ac837e7268d30b676025a4a Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Thu, 14 Mar 2024 19:29:18 -0600 Subject: [PATCH 10/26] Remove [test] package from pyramid instrumentation (#2273) Fixes #2214 --- .../pyproject.toml | 5 ---- .../test-requirements.txt | 30 +++++++++++++++++++ tox.ini | 7 ++--- 3 files changed, 33 insertions(+), 9 deletions(-) create mode 100644 instrumentation/opentelemetry-instrumentation-pyramid/test-requirements.txt diff --git a/instrumentation/opentelemetry-instrumentation-pyramid/pyproject.toml b/instrumentation/opentelemetry-instrumentation-pyramid/pyproject.toml index 1face37ccc..4f6577d4a8 100644 --- a/instrumentation/opentelemetry-instrumentation-pyramid/pyproject.toml +++ b/instrumentation/opentelemetry-instrumentation-pyramid/pyproject.toml @@ -36,11 +36,6 @@ dependencies = [ instruments = [ "pyramid >= 1.7", ] -test = [ - "opentelemetry-instrumentation-pyramid[instruments]", - "opentelemetry-test-utils == 0.45b0.dev", - "werkzeug == 0.16.1", -] [project.entry-points.opentelemetry_instrumentor] pyramid = "opentelemetry.instrumentation.pyramid:PyramidInstrumentor" diff --git a/instrumentation/opentelemetry-instrumentation-pyramid/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-pyramid/test-requirements.txt new file mode 100644 index 0000000000..1362e7166e --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-pyramid/test-requirements.txt @@ -0,0 +1,30 @@ +asgiref==3.7.2 +attrs==23.2.0 +Deprecated==1.2.14 +hupper==1.12.1 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +packaging==23.2 +PasteDeploy==3.1.0 +plaster==1.1.2 +plaster-pastedeploy==1.0.1 +pluggy==1.4.0 +py==1.11.0 +py-cpuinfo==9.0.0 +pyramid==2.0.2 +pytest==7.1.3 +pytest-benchmark==4.0.0 +tomli==2.0.1 +translationstring==1.4 +typing_extensions==4.9.0 +venusian==3.1.0 +WebOb==1.8.7 +Werkzeug==0.16.1 +wrapt==1.16.0 +zipp==3.17.0 +zope.deprecation==5.0 +zope.interface==6.2 +-e opentelemetry-instrumentation +-e instrumentation/opentelemetry-instrumentation-wsgi +-e util/opentelemetry-util-http +-e instrumentation/opentelemetry-instrumentation-pyramid diff --git a/tox.ini b/tox.ini index e1d78919bc..ac4123f4ce 100644 --- a/tox.ini +++ b/tox.ini @@ -345,8 +345,7 @@ commands_pre = grpc: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-grpc[test] - pyramid,tornado,starlette,fastapi,aiohttp,httpx-{18,21},requests,urllib,urllib3v-{1,2}: pip install {toxinidir}/util/opentelemetry-util-http - pyramid: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-wsgi + tornado,starlette,fastapi,aiohttp,httpx-{18,21},requests,urllib,urllib3v-{1,2}: pip install {toxinidir}/util/opentelemetry-util-http starlette,fastapi: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-asgi wsgi: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-wsgi/test-requirements.txt @@ -402,7 +401,7 @@ commands_pre = pymysql: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-dbapi {toxinidir}/instrumentation/opentelemetry-instrumentation-pymysql[test] - pyramid: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-pyramid[test] + pyramid: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-pyramid/test-requirements.txt sqlite3: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-dbapi {toxinidir}/instrumentation/opentelemetry-instrumentation-sqlite3[test] @@ -587,7 +586,7 @@ commands_pre = python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-aiohttp-server[test] pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-aiopg/test-requirements.txt python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-sqlite3[test] - python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-pyramid[test] + pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-pyramid/test-requirements.txt python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-requests[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib3[test] From e923938646341c2ec54d7ba55cb486b1a2b6e7b7 Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Thu, 14 Mar 2024 19:53:17 -0600 Subject: [PATCH 11/26] Remove [test] package from starlette instrumentation (#2278) Fixes #2221 --- .../pyproject.toml | 6 ---- .../test-requirements.txt | 31 +++++++++++++++++++ tox.ini | 8 ++--- 3 files changed, 35 insertions(+), 10 deletions(-) create mode 100644 instrumentation/opentelemetry-instrumentation-starlette/test-requirements.txt diff --git a/instrumentation/opentelemetry-instrumentation-starlette/pyproject.toml b/instrumentation/opentelemetry-instrumentation-starlette/pyproject.toml index 8b2f2a7014..a73d5b0455 100644 --- a/instrumentation/opentelemetry-instrumentation-starlette/pyproject.toml +++ b/instrumentation/opentelemetry-instrumentation-starlette/pyproject.toml @@ -35,12 +35,6 @@ dependencies = [ instruments = [ "starlette ~= 0.13.0", ] -test = [ - "opentelemetry-instrumentation-starlette[instruments]", - "opentelemetry-test-utils == 0.45b0.dev", - "requests ~= 2.23", # needed for testclient - "httpx ~= 0.22", # needed for testclient -] [project.entry-points.opentelemetry_instrumentor] starlette = "opentelemetry.instrumentation.starlette:StarletteInstrumentor" diff --git a/instrumentation/opentelemetry-instrumentation-starlette/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-starlette/test-requirements.txt new file mode 100644 index 0000000000..1cd21039a7 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-starlette/test-requirements.txt @@ -0,0 +1,31 @@ +anyio==4.3.0 +asgiref==3.7.2 +attrs==23.2.0 +certifi==2024.2.2 +charset-normalizer==3.3.2 +Deprecated==1.2.14 +exceptiongroup==1.2.0 +h11==0.14.0 +httpcore==1.0.4 +httpx==0.27.0 +idna==3.6 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +packaging==23.2 +pluggy==1.4.0 +py==1.11.0 +py-cpuinfo==9.0.0 +pytest==7.1.3 +pytest-benchmark==4.0.0 +requests==2.31.0 +sniffio==1.3.0 +starlette==0.13.8 +tomli==2.0.1 +typing_extensions==4.9.0 +urllib3==2.2.1 +wrapt==1.16.0 +zipp==3.17.0 +-e opentelemetry-instrumentation +-e instrumentation/opentelemetry-instrumentation-asgi +-e util/opentelemetry-util-http +-e instrumentation/opentelemetry-instrumentation-starlette diff --git a/tox.ini b/tox.ini index ac4123f4ce..6c0f00b7c2 100644 --- a/tox.ini +++ b/tox.ini @@ -345,8 +345,8 @@ commands_pre = grpc: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-grpc[test] - tornado,starlette,fastapi,aiohttp,httpx-{18,21},requests,urllib,urllib3v-{1,2}: pip install {toxinidir}/util/opentelemetry-util-http - starlette,fastapi: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-asgi + tornado,fastapi,aiohttp,httpx-{18,21},requests,urllib,urllib3v-{1,2}: pip install {toxinidir}/util/opentelemetry-util-http + fastapi: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-asgi wsgi: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-wsgi/test-requirements.txt @@ -411,7 +411,7 @@ commands_pre = requests: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-requests[test] - starlette: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-starlette[test] + starlette: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-starlette/test-requirements.txt system-metrics: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-system-metrics[test] @@ -561,7 +561,7 @@ commands_pre = python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-botocore[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-boto3sqs[test] pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-django/test-requirements-3.txt - python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-starlette[test] + pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-starlette/test-requirements.txt python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-grpc[test] pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-falcon/test-requirements-2.txt python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-boto[test] From fd6b8f1647e18b9c2be4e45d46ed49b50902923f Mon Sep 17 00:00:00 2001 From: Mario de Frutos Dieguez Date: Fri, 15 Mar 2024 13:07:40 +0100 Subject: [PATCH 12/26] Fix response hook (#2038) Response hook receives a third parameter, Response, and that should be reflected in the _ResponseHook type Co-authored-by: Leighton Chen Co-authored-by: Shalev Roda <65566801+shalevr@users.noreply.github.com> --- .../src/opentelemetry/instrumentation/requests/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instrumentation/opentelemetry-instrumentation-requests/src/opentelemetry/instrumentation/requests/__init__.py b/instrumentation/opentelemetry-instrumentation-requests/src/opentelemetry/instrumentation/requests/__init__.py index 4c198596a2..d0150d57b7 100644 --- a/instrumentation/opentelemetry-instrumentation-requests/src/opentelemetry/instrumentation/requests/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-requests/src/opentelemetry/instrumentation/requests/__init__.py @@ -105,7 +105,7 @@ _excluded_urls_from_env = get_excluded_urls("REQUESTS") _RequestHookT = Optional[Callable[[Span, PreparedRequest], None]] -_ResponseHookT = Optional[Callable[[Span, PreparedRequest], None]] +_ResponseHookT = Optional[Callable[[Span, PreparedRequest, Response], None]] # pylint: disable=unused-argument From 7404e69663bb4ee3394f089857d402ae0616a3bf Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Fri, 15 Mar 2024 10:38:56 -0600 Subject: [PATCH 13/26] Remove [test] package from fastapi instrumentation (#2289) Fixes #2201 --- .../pyproject.toml | 6 ---- .../test-requirements.txt | 35 +++++++++++++++++++ tox.ini | 7 ++-- 3 files changed, 38 insertions(+), 10 deletions(-) create mode 100644 instrumentation/opentelemetry-instrumentation-fastapi/test-requirements.txt diff --git a/instrumentation/opentelemetry-instrumentation-fastapi/pyproject.toml b/instrumentation/opentelemetry-instrumentation-fastapi/pyproject.toml index 4df6d3760c..89f1c77e43 100644 --- a/instrumentation/opentelemetry-instrumentation-fastapi/pyproject.toml +++ b/instrumentation/opentelemetry-instrumentation-fastapi/pyproject.toml @@ -35,12 +35,6 @@ dependencies = [ instruments = [ "fastapi ~= 0.58", ] -test = [ - "opentelemetry-instrumentation-fastapi[instruments]", - "opentelemetry-test-utils == 0.45b0.dev", - "requests ~= 2.23", # needed for testclient - "httpx ~= 0.22", # needed for testclient -] [project.entry-points.opentelemetry_instrumentor] fastapi = "opentelemetry.instrumentation.fastapi:FastAPIInstrumentor" diff --git a/instrumentation/opentelemetry-instrumentation-fastapi/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-fastapi/test-requirements.txt new file mode 100644 index 0000000000..8d7bf3ad78 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-fastapi/test-requirements.txt @@ -0,0 +1,35 @@ +annotated-types==0.6.0 +anyio==4.3.0 +asgiref==3.7.2 +attrs==23.2.0 +certifi==2024.2.2 +charset-normalizer==3.3.2 +Deprecated==1.2.14 +exceptiongroup==1.2.0 +fastapi==0.109.2 +h11==0.14.0 +httpcore==1.0.4 +httpx==0.27.0 +idna==3.6 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +packaging==23.2 +pluggy==1.4.0 +py==1.11.0 +py-cpuinfo==9.0.0 +pydantic==2.6.2 +pydantic_core==2.16.3 +pytest==7.1.3 +pytest-benchmark==4.0.0 +requests==2.31.0 +sniffio==1.3.0 +starlette==0.36.3 +tomli==2.0.1 +typing_extensions==4.9.0 +urllib3==2.2.1 +wrapt==1.16.0 +zipp==3.17.0 +-e opentelemetry-instrumentation +-e instrumentation/opentelemetry-instrumentation-asgi +-e util/opentelemetry-util-http +-e instrumentation/opentelemetry-instrumentation-fastapi diff --git a/tox.ini b/tox.ini index 6c0f00b7c2..935d46e5f4 100644 --- a/tox.ini +++ b/tox.ini @@ -345,8 +345,7 @@ commands_pre = grpc: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-grpc[test] - tornado,fastapi,aiohttp,httpx-{18,21},requests,urllib,urllib3v-{1,2}: pip install {toxinidir}/util/opentelemetry-util-http - fastapi: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-asgi + tornado,aiohttp,httpx-{18,21},requests,urllib,urllib3v-{1,2}: pip install {toxinidir}/util/opentelemetry-util-http wsgi: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-wsgi/test-requirements.txt @@ -385,7 +384,7 @@ commands_pre = pypy3-test-instrumentation-django-0: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-django/test-requirements-0.txt pypy3-test-instrumentation-django-1: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-django/test-requirements-1.txt - fastapi: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-fastapi[test] + fastapi: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-fastapi/test-requirements.txt mysql: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-dbapi {toxinidir}/instrumentation/opentelemetry-instrumentation-mysql[test] @@ -574,7 +573,7 @@ commands_pre = ; python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-sklearn[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-redis[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-remoulade[test] - python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-fastapi[test] + pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-fastapi/test-requirements.txt python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-jinja2[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-kafka-python[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-confluent-kafka[test] From 8d436187981f479b796c38082d3e987dd5eb79a6 Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Fri, 15 Mar 2024 10:50:17 -0600 Subject: [PATCH 14/26] Remove [test] package from tornado instrumentation (#2280) Fixes #2223 --- .../pyproject.toml | 5 --- .../test-requirements.txt | 32 +++++++++++++++++++ .../tests/test_instrumentation.py | 2 +- tox.ini | 6 ++-- 4 files changed, 36 insertions(+), 9 deletions(-) create mode 100644 instrumentation/opentelemetry-instrumentation-tornado/test-requirements.txt diff --git a/instrumentation/opentelemetry-instrumentation-tornado/pyproject.toml b/instrumentation/opentelemetry-instrumentation-tornado/pyproject.toml index 54706b42f2..e56a566410 100644 --- a/instrumentation/opentelemetry-instrumentation-tornado/pyproject.toml +++ b/instrumentation/opentelemetry-instrumentation-tornado/pyproject.toml @@ -33,11 +33,6 @@ dependencies = [ instruments = [ "tornado >= 5.1.1", ] -test = [ - "opentelemetry-instrumentation-tornado[instruments]", - "opentelemetry-test-utils == 0.45b0.dev", - "http-server-mock" -] [project.entry-points.opentelemetry_instrumentor] tornado = "opentelemetry.instrumentation.tornado:TornadoInstrumentor" diff --git a/instrumentation/opentelemetry-instrumentation-tornado/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-tornado/test-requirements.txt new file mode 100644 index 0000000000..9f637278fd --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-tornado/test-requirements.txt @@ -0,0 +1,32 @@ +asgiref==3.7.2 +attrs==23.2.0 +blinker==1.7.0 +certifi==2024.2.2 +charset-normalizer==3.3.2 +click==8.1.7 +Deprecated==1.2.14 +Flask==3.0.2 +http_server_mock==1.7 +idna==3.6 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +itsdangerous==2.1.2 +Jinja2==3.1.3 +MarkupSafe==2.1.5 +packaging==23.2 +pluggy==1.4.0 +py==1.11.0 +py-cpuinfo==9.0.0 +pytest==7.1.3 +pytest-benchmark==4.0.0 +requests==2.31.0 +tomli==2.0.1 +tornado==6.4 +typing_extensions==4.9.0 +urllib3==2.2.1 +Werkzeug==3.0.1 +wrapt==1.16.0 +zipp==3.17.0 +-e opentelemetry-instrumentation +-e util/opentelemetry-util-http +-e instrumentation/opentelemetry-instrumentation-tornado diff --git a/instrumentation/opentelemetry-instrumentation-tornado/tests/test_instrumentation.py b/instrumentation/opentelemetry-instrumentation-tornado/tests/test_instrumentation.py index 0baaa348ab..01cdddceed 100644 --- a/instrumentation/opentelemetry-instrumentation-tornado/tests/test_instrumentation.py +++ b/instrumentation/opentelemetry-instrumentation-tornado/tests/test_instrumentation.py @@ -528,7 +528,7 @@ def index(): class TestTornadoInstrumentationWithXHeaders(TornadoTest): - def get_httpserver_options(self): + def get_httpserver_options(self): # pylint: disable=no-self-use return {"xheaders": True} def test_xheaders(self): diff --git a/tox.ini b/tox.ini index 935d46e5f4..4ba21be3f8 100644 --- a/tox.ini +++ b/tox.ini @@ -345,7 +345,7 @@ commands_pre = grpc: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-grpc[test] - tornado,aiohttp,httpx-{18,21},requests,urllib,urllib3v-{1,2}: pip install {toxinidir}/util/opentelemetry-util-http + aiohttp,httpx-{18,21},requests,urllib,urllib3v-{1,2}: pip install {toxinidir}/util/opentelemetry-util-http wsgi: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-wsgi/test-requirements.txt @@ -414,7 +414,7 @@ commands_pre = system-metrics: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-system-metrics[test] - tornado: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-tornado[test] + tornado: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-tornado/test-requirements.txt tortoiseorm: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-tortoiseorm[test] @@ -596,7 +596,7 @@ commands_pre = python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-pymongo[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-elasticsearch[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-asyncpg[test] - python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-tornado[test] + pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-tornado/test-requirements.txt python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-tortoiseorm[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-mysql[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-httpx[test] From 17de1d576558294c2982e08b4c444e88ed3bb41d Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Fri, 15 Mar 2024 11:16:35 -0600 Subject: [PATCH 15/26] Remove [test] package from aiohttp-client instrumentation (#2238) Fixes #2183 --- .../pyproject.toml | 4 -- .../test-requirements.txt | 37 +++++++++++++++++++ tox.ini | 8 ++-- 3 files changed, 42 insertions(+), 7 deletions(-) create mode 100644 instrumentation/opentelemetry-instrumentation-aiohttp-client/test-requirements.txt diff --git a/instrumentation/opentelemetry-instrumentation-aiohttp-client/pyproject.toml b/instrumentation/opentelemetry-instrumentation-aiohttp-client/pyproject.toml index 9aac42647a..b7c0e52b7c 100644 --- a/instrumentation/opentelemetry-instrumentation-aiohttp-client/pyproject.toml +++ b/instrumentation/opentelemetry-instrumentation-aiohttp-client/pyproject.toml @@ -35,10 +35,6 @@ dependencies = [ instruments = [ "aiohttp ~= 3.0", ] -test = [ - "opentelemetry-instrumentation-aiohttp-client[instruments]", - "http-server-mock" -] [project.entry-points.opentelemetry_instrumentor] aiohttp-client = "opentelemetry.instrumentation.aiohttp_client:AioHttpClientInstrumentor" diff --git a/instrumentation/opentelemetry-instrumentation-aiohttp-client/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-aiohttp-client/test-requirements.txt new file mode 100644 index 0000000000..b8ccfd2a50 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-aiohttp-client/test-requirements.txt @@ -0,0 +1,37 @@ +aiohttp==3.9.3 +aiosignal==1.3.1 +asgiref==3.7.2 +async-timeout==4.0.3 +attrs==23.2.0 +blinker==1.7.0 +certifi==2024.2.2 +charset-normalizer==3.3.2 +click==8.1.7 +Deprecated==1.2.14 +Flask==3.0.2 +frozenlist==1.4.1 +http_server_mock==1.7 +idna==3.6 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +itsdangerous==2.1.2 +Jinja2==3.1.3 +MarkupSafe==2.1.5 +multidict==6.0.5 +packaging==23.2 +pluggy==1.4.0 +py==1.11.0 +py-cpuinfo==9.0.0 +pytest==7.1.3 +pytest-benchmark==4.0.0 +requests==2.31.0 +tomli==2.0.1 +typing_extensions==4.10.0 +urllib3==2.2.1 +Werkzeug==3.0.1 +wrapt==1.16.0 +yarl==1.9.4 +zipp==3.17.0 +-e opentelemetry-instrumentation +-e util/opentelemetry-util-http +-e instrumentation/opentelemetry-instrumentation-aiohttp-client diff --git a/tox.ini b/tox.ini index 4ba21be3f8..152a1a57f1 100644 --- a/tox.ini +++ b/tox.ini @@ -345,7 +345,7 @@ commands_pre = grpc: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-grpc[test] - aiohttp,httpx-{18,21},requests,urllib,urllib3v-{1,2}: pip install {toxinidir}/util/opentelemetry-util-http + aiohttp-server,httpx-{18,21},requests,urllib,urllib3v-{1,2}: pip install {toxinidir}/util/opentelemetry-util-http wsgi: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-wsgi/test-requirements.txt @@ -422,7 +422,9 @@ commands_pre = logging: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-logging[test] - aiohttp-client: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-aiohttp-client[test] + aio-pika-{8,9}: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-aio-pika[test] + + aiohttp-client: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-aiohttp-client/test-requirements.txt aiohttp-server: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-aiohttp-server[test] @@ -581,7 +583,7 @@ commands_pre = python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-pymemcache[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-psycopg[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-psycopg2[test] - python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-aiohttp-client[test] + pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-aiohttp-client/test-requirements.txt python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-aiohttp-server[test] pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-aiopg/test-requirements.txt python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-sqlite3[test] From 28f49a56e46e6b06695b8a0613e7018e1d3e5c48 Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Fri, 15 Mar 2024 11:37:21 -0600 Subject: [PATCH 16/26] Remove [test] package from aiohttp-server instrumentation (#2242) Fixes #2184 --- .../pyproject.toml | 5 ---- .../test-requirements.txt | 27 +++++++++++++++++++ tox.ini | 6 ++--- 3 files changed, 30 insertions(+), 8 deletions(-) create mode 100644 instrumentation/opentelemetry-instrumentation-aiohttp-server/test-requirements.txt diff --git a/instrumentation/opentelemetry-instrumentation-aiohttp-server/pyproject.toml b/instrumentation/opentelemetry-instrumentation-aiohttp-server/pyproject.toml index 566f9dbb35..3ea2340d89 100644 --- a/instrumentation/opentelemetry-instrumentation-aiohttp-server/pyproject.toml +++ b/instrumentation/opentelemetry-instrumentation-aiohttp-server/pyproject.toml @@ -35,11 +35,6 @@ dependencies = [ instruments = [ "aiohttp ~= 3.0", ] -test = [ - "opentelemetry-instrumentation-aiohttp-server[instruments]", - "pytest-asyncio", - "pytest-aiohttp", -] [project.entry-points.opentelemetry_instrumentor] aiohttp-server = "opentelemetry.instrumentation.aiohttp_server:AioHttpServerInstrumentor" diff --git a/instrumentation/opentelemetry-instrumentation-aiohttp-server/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-aiohttp-server/test-requirements.txt new file mode 100644 index 0000000000..9f6d7accce --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-aiohttp-server/test-requirements.txt @@ -0,0 +1,27 @@ +aiohttp==3.9.3 +aiosignal==1.3.1 +asgiref==3.7.2 +async-timeout==4.0.3 +attrs==23.2.0 +Deprecated==1.2.14 +frozenlist==1.4.1 +idna==3.6 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +multidict==6.0.5 +packaging==23.2 +pluggy==1.4.0 +py==1.11.0 +py-cpuinfo==9.0.0 +pytest==7.1.3 +pytest-aiohttp==1.0.5 +pytest-asyncio==0.23.5 +pytest-benchmark==4.0.0 +tomli==2.0.1 +typing_extensions==4.10.0 +wrapt==1.16.0 +yarl==1.9.4 +zipp==3.17.0 +-e opentelemetry-instrumentation +-e util/opentelemetry-util-http +-e instrumentation/opentelemetry-instrumentation-aiohttp-server diff --git a/tox.ini b/tox.ini index 152a1a57f1..bf2a9dc64c 100644 --- a/tox.ini +++ b/tox.ini @@ -345,7 +345,7 @@ commands_pre = grpc: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-grpc[test] - aiohttp-server,httpx-{18,21},requests,urllib,urllib3v-{1,2}: pip install {toxinidir}/util/opentelemetry-util-http + httpx-{18,21},requests,urllib,urllib3v-{1,2}: pip install {toxinidir}/util/opentelemetry-util-http wsgi: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-wsgi/test-requirements.txt @@ -426,7 +426,7 @@ commands_pre = aiohttp-client: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-aiohttp-client/test-requirements.txt - aiohttp-server: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-aiohttp-server[test] + aiohttp-server: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-aiohttp-server/test-requirements.txt aiopg: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-aiopg/test-requirements.txt @@ -584,8 +584,8 @@ commands_pre = python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-psycopg[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-psycopg2[test] pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-aiohttp-client/test-requirements.txt - python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-aiohttp-server[test] pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-aiopg/test-requirements.txt + pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-aiohttp-server/test-requirements.txt python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-sqlite3[test] pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-pyramid/test-requirements.txt python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-requests[test] From d1c3cb33dcebfe349c64427e3b2580f12c4795b2 Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Fri, 15 Mar 2024 12:39:51 -0600 Subject: [PATCH 17/26] Remove [test] package from httpx instrumentation (#2314) Fixes #2203 --- .../pyproject.toml | 5 --- .../test-requirements-0.txt | 28 +++++++++++++ .../test-requirements-1.txt | 27 ++++++++++++ tox.ini | 41 ++++++++++--------- 4 files changed, 76 insertions(+), 25 deletions(-) create mode 100644 instrumentation/opentelemetry-instrumentation-httpx/test-requirements-0.txt create mode 100644 instrumentation/opentelemetry-instrumentation-httpx/test-requirements-1.txt diff --git a/instrumentation/opentelemetry-instrumentation-httpx/pyproject.toml b/instrumentation/opentelemetry-instrumentation-httpx/pyproject.toml index f13fa816bc..1a4da4a520 100644 --- a/instrumentation/opentelemetry-instrumentation-httpx/pyproject.toml +++ b/instrumentation/opentelemetry-instrumentation-httpx/pyproject.toml @@ -34,11 +34,6 @@ dependencies = [ instruments = [ "httpx >= 0.18.0", ] -test = [ - "opentelemetry-instrumentation-httpx[instruments]", - "opentelemetry-sdk ~= 1.12", - "opentelemetry-test-utils == 0.45b0.dev", -] [project.entry-points.opentelemetry_instrumentor] httpx = "opentelemetry.instrumentation.httpx:HTTPXClientInstrumentor" diff --git a/instrumentation/opentelemetry-instrumentation-httpx/test-requirements-0.txt b/instrumentation/opentelemetry-instrumentation-httpx/test-requirements-0.txt new file mode 100644 index 0000000000..2d3a8399d8 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-httpx/test-requirements-0.txt @@ -0,0 +1,28 @@ +anyio==3.7.1 +asgiref==3.7.2 +attrs==23.2.0 +certifi==2024.2.2 +Deprecated==1.2.14 +exceptiongroup==1.2.0 +h11==0.12.0 +httpcore==0.13.7 +httpx==0.18.2 +idna==3.6 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +packaging==23.2 +pluggy==1.4.0 +py==1.11.0 +py-cpuinfo==9.0.0 +pytest==7.1.3 +pytest-benchmark==4.0.0 +respx==0.17.1 +rfc3986==1.5.0 +sniffio==1.3.1 +tomli==2.0.1 +typing_extensions==4.10.0 +wrapt==1.16.0 +zipp==3.17.0 +-e opentelemetry-instrumentation +-e util/opentelemetry-util-http +-e instrumentation/opentelemetry-instrumentation-httpx diff --git a/instrumentation/opentelemetry-instrumentation-httpx/test-requirements-1.txt b/instrumentation/opentelemetry-instrumentation-httpx/test-requirements-1.txt new file mode 100644 index 0000000000..4a36398fc1 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-httpx/test-requirements-1.txt @@ -0,0 +1,27 @@ +anyio==4.3.0 +asgiref==3.7.2 +attrs==23.2.0 +certifi==2024.2.2 +Deprecated==1.2.14 +exceptiongroup==1.2.0 +h11==0.14.0 +httpcore==1.0.4 +httpx==0.27.0 +idna==3.6 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +packaging==23.2 +pluggy==1.4.0 +py==1.11.0 +py-cpuinfo==9.0.0 +pytest==7.1.3 +pytest-benchmark==4.0.0 +respx==0.20.2 +sniffio==1.3.1 +tomli==2.0.1 +typing_extensions==4.10.0 +wrapt==1.16.0 +zipp==3.17.0 +-e opentelemetry-instrumentation +-e util/opentelemetry-util-http +-e instrumentation/opentelemetry-instrumentation-httpx diff --git a/tox.ini b/tox.ini index bf2a9dc64c..4e5832fbf8 100644 --- a/tox.ini +++ b/tox.ini @@ -221,8 +221,8 @@ envlist = pypy3-test-instrumentation-tortoiseorm ; opentelemetry-instrumentation-httpx - py3{8,9,10,11}-test-instrumentation-httpx-{18,21} - pypy3-test-instrumentation-httpx-{18,21} + py3{8,9,10,11}-test-instrumentation-httpx-{0,1} + pypy3-test-instrumentation-httpx-{0,1} ; opentelemetry-util-http py3{8,9,10,11}-test-util-http @@ -300,10 +300,6 @@ deps = pymemcache-300: pymemcache >3.0.0,<3.4.2 pymemcache-342: pymemcache ==3.4.2 pymemcache-400: pymemcache ==4.0.0 - httpx-18: httpx>=0.18.0,<0.19.0 - httpx-18: respx~=0.17.0 - httpx-21: httpx>=0.19.0 - httpx-21: respx~=0.20.1 urllib3v-1: urllib3 >=1.0.0,<2.0.0 urllib3v-2: urllib3 >=2.0.0,<3.0.0 @@ -345,7 +341,7 @@ commands_pre = grpc: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-grpc[test] - httpx-{18,21},requests,urllib,urllib3v-{1,2}: pip install {toxinidir}/util/opentelemetry-util-http + requests,urllib,urllib3v-{1,2}: pip install {toxinidir}/util/opentelemetry-util-http wsgi: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-wsgi/test-requirements.txt @@ -422,7 +418,7 @@ commands_pre = logging: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-logging[test] - aio-pika-{8,9}: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-aio-pika[test] + aio-pika-{0,1,2}: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-aio-pika/test-requirements-2.txt aiohttp-client: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-aiohttp-client/test-requirements.txt @@ -442,7 +438,12 @@ commands_pre = asyncio: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-asyncio/test-requirements.txt - httpx-{18,21}: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-httpx[test] + ; The numbers at the end of the environment names + ; below mean these dependencies are being used: + ; 0: httpx>=0.18.0,<0.19.0 respx~=0.17.0 + ; 1: httpx>=0.19.0 respx~=0.20.1 + httpx-0: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-httpx/test-requirements-0.txt + httpx-1: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-httpx/test-requirements-1.txt sdkextension-aws: pip install {toxinidir}/sdk-extension/opentelemetry-sdk-extension-aws[test] @@ -472,13 +473,13 @@ commands = test-instrumentation-cassandra: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-cassandra/tests {posargs} test-instrumentation-celery: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-celery/tests {posargs} test-instrumentation-dbapi: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-dbapi/tests {posargs} - test-instrumentation-django-{1,2,3,4}: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-django/tests {posargs} - test-instrumentation-elasticsearch-{2,5,6}: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-elasticsearch/tests {posargs} - test-instrumentation-falcon-{1,2,3}: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-falcon/tests {posargs} + test-instrumentation-django: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-django/tests {posargs} + test-instrumentation-elasticsearch: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-elasticsearch/tests {posargs} + test-instrumentation-falcon: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-falcon/tests {posargs} test-instrumentation-fastapi: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-fastapi/tests {posargs} - test-instrumentation-flask-{213,220,300}: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-flask/tests {posargs} + test-instrumentation-flask: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-flask/tests {posargs} test-instrumentation-urllib: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib/tests {posargs} - test-instrumentation-urllib3v-{1,2}: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib3/tests {posargs} + test-instrumentation-urllib3v: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib3/tests {posargs} test-instrumentation-grpc: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-grpc/tests {posargs} test-instrumentation-jinja2: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-jinja2/tests {posargs} test-instrumentation-kafka-python: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-kafka-python/tests {posargs} @@ -486,11 +487,11 @@ commands = test-instrumentation-logging: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-logging/tests {posargs} test-instrumentation-mysql: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-mysql/tests {posargs} test-instrumentation-mysqlclient: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-mysqlclient/tests {posargs} - test-instrumentation-sio-pika-{0,1}: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-pika/tests {posargs} - test-instrumentation-aio-pika-{8,9}: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-aio-pika/tests {posargs} + test-instrumentation-sio-pika: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-pika/tests {posargs} + test-instrumentation-aio-pika: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-aio-pika/tests {posargs} test-instrumentation-psycopg: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-psycopg/tests {posargs} test-instrumentation-psycopg2: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-psycopg2/tests {posargs} - test-instrumentation-pymemcache-{135,200,300,342,400}: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-pymemcache/tests {posargs} + test-instrumentation-pymemcache: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-pymemcache/tests {posargs} test-instrumentation-pymongo: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-pymongo/tests {posargs} test-instrumentation-pymysql: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-pymysql/tests {posargs} test-instrumentation-pyramid: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-pyramid/tests {posargs} @@ -498,14 +499,14 @@ commands = test-instrumentation-remoulade: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-remoulade/tests {posargs} test-instrumentation-requests: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-requests/tests {posargs} test-instrumentation-sklearn: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-sklearn/tests {posargs} - test-instrumentation-sqlalchemy-{11,14}: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-sqlalchemy/tests {posargs} + test-instrumentation-sqlalchemy: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-sqlalchemy/tests {posargs} test-instrumentation-sqlite3: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-sqlite3/tests {posargs} test-instrumentation-starlette: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-starlette/tests {posargs} test-instrumentation-system-metrics: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-system-metrics/tests {posargs} test-instrumentation-tornado: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-tornado/tests {posargs} test-instrumentation-tortoiseorm: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-tortoiseorm/tests {posargs} test-instrumentation-wsgi: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-wsgi/tests {posargs} - test-instrumentation-httpx-{18,21}: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-httpx/tests {posargs} + test-instrumentation-httpx: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-httpx/tests {posargs} test-instrumentation-asyncio: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-asyncio/tests {posargs} test-util-http: pytest {toxinidir}/util/opentelemetry-util-http/tests {posargs} test-sdkextension-aws: pytest {toxinidir}/sdk-extension/opentelemetry-sdk-extension-aws/tests {posargs} @@ -601,7 +602,7 @@ commands_pre = pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-tornado/test-requirements.txt python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-tortoiseorm[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-mysql[test] - python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-httpx[test] + pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-httpx/test-requirements-1.txt python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-aws-lambda[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-system-metrics[test] pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-asyncio/test-requirements.txt From fbda226a5a781c091edc1482b050dc5165d3badb Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Fri, 15 Mar 2024 14:10:12 -0600 Subject: [PATCH 18/26] Remove [test] package from requests instrumentation (#2276) Fixes #2217 --- .../pyproject.toml | 5 ---- .../test-requirements.txt | 24 +++++++++++++++++++ tox.ini | 6 ++--- 3 files changed, 27 insertions(+), 8 deletions(-) create mode 100644 instrumentation/opentelemetry-instrumentation-requests/test-requirements.txt diff --git a/instrumentation/opentelemetry-instrumentation-requests/pyproject.toml b/instrumentation/opentelemetry-instrumentation-requests/pyproject.toml index a4f8255e00..ce83ca93ac 100644 --- a/instrumentation/opentelemetry-instrumentation-requests/pyproject.toml +++ b/instrumentation/opentelemetry-instrumentation-requests/pyproject.toml @@ -34,11 +34,6 @@ dependencies = [ instruments = [ "requests ~= 2.0", ] -test = [ - "opentelemetry-instrumentation-requests[instruments]", - "httpretty ~= 1.0", - "opentelemetry-test-utils == 0.45b0.dev", -] [project.entry-points.opentelemetry_instrumentor] requests = "opentelemetry.instrumentation.requests:RequestsInstrumentor" diff --git a/instrumentation/opentelemetry-instrumentation-requests/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-requests/test-requirements.txt new file mode 100644 index 0000000000..be34594506 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-requests/test-requirements.txt @@ -0,0 +1,24 @@ +asgiref==3.7.2 +attrs==23.2.0 +certifi==2024.2.2 +charset-normalizer==3.3.2 +Deprecated==1.2.14 +httpretty==1.1.4 +idna==3.6 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +packaging==23.2 +pluggy==1.4.0 +py==1.11.0 +py-cpuinfo==9.0.0 +pytest==7.1.3 +pytest-benchmark==4.0.0 +requests==2.31.0 +tomli==2.0.1 +typing_extensions==4.9.0 +urllib3==2.2.1 +wrapt==1.16.0 +zipp==3.17.0 +-e opentelemetry-instrumentation +-e util/opentelemetry-util-http +-e instrumentation/opentelemetry-instrumentation-requests diff --git a/tox.ini b/tox.ini index 4e5832fbf8..752f506ca6 100644 --- a/tox.ini +++ b/tox.ini @@ -341,7 +341,7 @@ commands_pre = grpc: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-grpc[test] - requests,urllib,urllib3v-{1,2}: pip install {toxinidir}/util/opentelemetry-util-http + ,urllib,urllib3v-{1,2}: pip install {toxinidir}/util/opentelemetry-util-http wsgi: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-wsgi/test-requirements.txt @@ -404,7 +404,7 @@ commands_pre = remoulade: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-remoulade[test] - requests: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-requests[test] + requests: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-requests/test-requirements.txt starlette: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-starlette/test-requirements.txt @@ -589,7 +589,7 @@ commands_pre = pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-aiohttp-server/test-requirements.txt python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-sqlite3[test] pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-pyramid/test-requirements.txt - python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-requests[test] + pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-requests/test-requirements.txt python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib3[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-pymysql[test] From 74820251f1f431d48ae2f99d1da1c23b10172040 Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Fri, 15 Mar 2024 14:33:49 -0600 Subject: [PATCH 19/26] Remove [test] package from urllib instrumentation (#2282) Fixes #2225 --- .../pyproject.toml | 4 ---- .../test-requirements.txt | 19 +++++++++++++++++++ tox.ini | 6 +++--- 3 files changed, 22 insertions(+), 7 deletions(-) create mode 100644 instrumentation/opentelemetry-instrumentation-urllib/test-requirements.txt diff --git a/instrumentation/opentelemetry-instrumentation-urllib/pyproject.toml b/instrumentation/opentelemetry-instrumentation-urllib/pyproject.toml index 3fe6d272cb..08a0f90aca 100644 --- a/instrumentation/opentelemetry-instrumentation-urllib/pyproject.toml +++ b/instrumentation/opentelemetry-instrumentation-urllib/pyproject.toml @@ -32,10 +32,6 @@ dependencies = [ [project.optional-dependencies] instruments = [] -test = [ - "httpretty ~= 1.0", - "opentelemetry-test-utils == 0.45b0.dev", -] [project.entry-points.opentelemetry_instrumentor] urllib = "opentelemetry.instrumentation.urllib:URLLibInstrumentor" diff --git a/instrumentation/opentelemetry-instrumentation-urllib/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-urllib/test-requirements.txt new file mode 100644 index 0000000000..cdb10df7e9 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-urllib/test-requirements.txt @@ -0,0 +1,19 @@ +asgiref==3.7.2 +attrs==23.2.0 +Deprecated==1.2.14 +httpretty==1.1.4 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +packaging==23.2 +pluggy==1.4.0 +py==1.11.0 +py-cpuinfo==9.0.0 +pytest==7.1.3 +pytest-benchmark==4.0.0 +tomli==2.0.1 +typing_extensions==4.9.0 +wrapt==1.16.0 +zipp==3.17.0 +-e opentelemetry-instrumentation +-e util/opentelemetry-util-http +-e instrumentation/opentelemetry-instrumentation-urllib diff --git a/tox.ini b/tox.ini index 752f506ca6..b59ee8d21b 100644 --- a/tox.ini +++ b/tox.ini @@ -341,7 +341,7 @@ commands_pre = grpc: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-grpc[test] - ,urllib,urllib3v-{1,2}: pip install {toxinidir}/util/opentelemetry-util-http + urllib3v-{1,2}: pip install {toxinidir}/util/opentelemetry-util-http wsgi: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-wsgi/test-requirements.txt @@ -362,7 +362,7 @@ commands_pre = flask-1: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-flask/test-requirements-1.txt flask-2: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-flask/test-requirements-2.txt - urllib: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib[test] + urllib: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib/test-requirements.txt urllib3v-{1,2}: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib3[test] @@ -590,7 +590,7 @@ commands_pre = python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-sqlite3[test] pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-pyramid/test-requirements.txt pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-requests/test-requirements.txt - python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib[test] + pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib/test-requirements.txt python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib3[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-pymysql[test] # prerequisite: follow the instructions here https://github.com/PyMySQL/mysqlclient#install From e30dd1abebd5c93d395c6ec3b4a87949a253fc84 Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Fri, 15 Mar 2024 14:49:03 -0600 Subject: [PATCH 20/26] Remove [test] package from urllib3 instrumentation (#2316) Fixes #2226 --- .github/workflows/instrumentations_1.yml | 2 +- .../pyproject.toml | 5 ----- .../test-requirements-0.txt | 20 +++++++++++++++++++ .../test-requirements-1.txt | 20 +++++++++++++++++++ tox.ini | 19 +++++++++--------- 5 files changed, 51 insertions(+), 15 deletions(-) create mode 100644 instrumentation/opentelemetry-instrumentation-urllib3/test-requirements-0.txt create mode 100644 instrumentation/opentelemetry-instrumentation-urllib3/test-requirements-1.txt diff --git a/.github/workflows/instrumentations_1.yml b/.github/workflows/instrumentations_1.yml index 0640c056a6..978642a7a3 100644 --- a/.github/workflows/instrumentations_1.yml +++ b/.github/workflows/instrumentations_1.yml @@ -25,7 +25,7 @@ jobs: python-version: [py38, py39, py310, py311, pypy3] package: - "urllib" - - "urllib3v" + - "urllib3" - "wsgi" - "distro" - "richconsole" diff --git a/instrumentation/opentelemetry-instrumentation-urllib3/pyproject.toml b/instrumentation/opentelemetry-instrumentation-urllib3/pyproject.toml index fbd27f7bd8..628cb46554 100644 --- a/instrumentation/opentelemetry-instrumentation-urllib3/pyproject.toml +++ b/instrumentation/opentelemetry-instrumentation-urllib3/pyproject.toml @@ -35,11 +35,6 @@ dependencies = [ instruments = [ "urllib3 >= 1.0.0, < 3.0.0", ] -test = [ - "opentelemetry-instrumentation-urllib3[instruments]", - "httpretty ~= 1.0", - "opentelemetry-test-utils == 0.45b0.dev", -] [project.entry-points.opentelemetry_instrumentor] urllib3 = "opentelemetry.instrumentation.urllib3:URLLib3Instrumentor" diff --git a/instrumentation/opentelemetry-instrumentation-urllib3/test-requirements-0.txt b/instrumentation/opentelemetry-instrumentation-urllib3/test-requirements-0.txt new file mode 100644 index 0000000000..730ef16977 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-urllib3/test-requirements-0.txt @@ -0,0 +1,20 @@ +asgiref==3.7.2 +attrs==23.2.0 +Deprecated==1.2.14 +httpretty==1.1.4 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +packaging==23.2 +pluggy==1.4.0 +py==1.11.0 +py-cpuinfo==9.0.0 +pytest==7.1.3 +pytest-benchmark==4.0.0 +tomli==2.0.1 +typing_extensions==4.10.0 +urllib3==1.26.18 +wrapt==1.16.0 +zipp==3.17.0 +-e opentelemetry-instrumentation +-e util/opentelemetry-util-http +-e instrumentation/opentelemetry-instrumentation-urllib3 diff --git a/instrumentation/opentelemetry-instrumentation-urllib3/test-requirements-1.txt b/instrumentation/opentelemetry-instrumentation-urllib3/test-requirements-1.txt new file mode 100644 index 0000000000..1f10502f57 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-urllib3/test-requirements-1.txt @@ -0,0 +1,20 @@ +asgiref==3.7.2 +attrs==23.2.0 +Deprecated==1.2.14 +httpretty==1.1.4 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +packaging==23.2 +pluggy==1.4.0 +py==1.11.0 +py-cpuinfo==9.0.0 +pytest==7.1.3 +pytest-benchmark==4.0.0 +tomli==2.0.1 +typing_extensions==4.10.0 +urllib3==2.2.1 +wrapt==1.16.0 +zipp==3.17.0 +-e opentelemetry-instrumentation +-e util/opentelemetry-util-http +-e instrumentation/opentelemetry-instrumentation-urllib3 diff --git a/tox.ini b/tox.ini index b59ee8d21b..d7c30a8e7b 100644 --- a/tox.ini +++ b/tox.ini @@ -110,8 +110,12 @@ envlist = pypy3-test-instrumentation-urllib ; opentelemetry-instrumentation-urllib3 - py3{8,9,10,11}-test-instrumentation-urllib3v-{1,2} - pypy3-test-instrumentation-urllib3v-{1,2} + ; The numbers at the end of the environment names + ; below mean these dependencies are being used: + ; 0: urllib3 >=1.0.0,<2.0.0 + ; 1: urllib3 >=2.0.0,<3.0.0 + py3{8,9,10,11}-test-instrumentation-urllib3-{0,1} + pypy3-test-instrumentation-urllib3-{0,1} ; opentelemetry-instrumentation-requests py3{8,9,10,11}-test-instrumentation-requests @@ -300,8 +304,6 @@ deps = pymemcache-300: pymemcache >3.0.0,<3.4.2 pymemcache-342: pymemcache ==3.4.2 pymemcache-400: pymemcache ==4.0.0 - urllib3v-1: urllib3 >=1.0.0,<2.0.0 - urllib3v-2: urllib3 >=2.0.0,<3.0.0 ; FIXME: add coverage testing ; FIXME: add mypy testing @@ -341,8 +343,6 @@ commands_pre = grpc: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-grpc[test] - urllib3v-{1,2}: pip install {toxinidir}/util/opentelemetry-util-http - wsgi: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-wsgi/test-requirements.txt asyncpg: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-asyncpg[test] @@ -364,7 +364,8 @@ commands_pre = urllib: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib/test-requirements.txt - urllib3v-{1,2}: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib3[test] + urllib3-0: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib3/test-requirements-0.txt + urllib3-1: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib3/test-requirements-1.txt botocore: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-botocore[test] @@ -479,7 +480,7 @@ commands = test-instrumentation-fastapi: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-fastapi/tests {posargs} test-instrumentation-flask: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-flask/tests {posargs} test-instrumentation-urllib: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib/tests {posargs} - test-instrumentation-urllib3v: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib3/tests {posargs} + test-instrumentation-urllib3: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib3/tests {posargs} test-instrumentation-grpc: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-grpc/tests {posargs} test-instrumentation-jinja2: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-jinja2/tests {posargs} test-instrumentation-kafka-python: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-kafka-python/tests {posargs} @@ -591,7 +592,7 @@ commands_pre = pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-pyramid/test-requirements.txt pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-requests/test-requirements.txt pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib/test-requirements.txt - python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib3[test] + pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-urllib3/test-requirements-1.txt python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-pymysql[test] # prerequisite: follow the instructions here https://github.com/PyMySQL/mysqlclient#install # for your OS to install the required dependencies From 0b5e3b4bcd235b2e1dfa7582939417f10b3cf0af Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Fri, 15 Mar 2024 15:08:03 -0600 Subject: [PATCH 21/26] Remove [test] package from pymemcache instrumentation (#2310) Fixes #2211 --- .../pyproject.toml | 4 ---- .../test-requirements-0.txt | 19 +++++++++++++++ .../test-requirements-1.txt | 19 +++++++++++++++ .../test-requirements-2.txt | 19 +++++++++++++++ .../test-requirements-3.txt | 19 +++++++++++++++ .../test-requirements-4.txt | 18 ++++++++++++++ tox.ini | 24 ++++++++++++------- 7 files changed, 109 insertions(+), 13 deletions(-) create mode 100644 instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-0.txt create mode 100644 instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-1.txt create mode 100644 instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-2.txt create mode 100644 instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-3.txt create mode 100644 instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-4.txt diff --git a/instrumentation/opentelemetry-instrumentation-pymemcache/pyproject.toml b/instrumentation/opentelemetry-instrumentation-pymemcache/pyproject.toml index e7a642b0aa..e37f566b0b 100644 --- a/instrumentation/opentelemetry-instrumentation-pymemcache/pyproject.toml +++ b/instrumentation/opentelemetry-instrumentation-pymemcache/pyproject.toml @@ -34,10 +34,6 @@ dependencies = [ instruments = [ "pymemcache >= 1.3.5, < 5", ] -test = [ - "opentelemetry-instrumentation-pymemcache[instruments]", - "opentelemetry-test-utils == 0.45b0.dev", -] [project.entry-points.opentelemetry_instrumentor] pymemcache = "opentelemetry.instrumentation.pymemcache:PymemcacheInstrumentor" diff --git a/instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-0.txt b/instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-0.txt new file mode 100644 index 0000000000..2e7313ab6e --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-0.txt @@ -0,0 +1,19 @@ +asgiref==3.7.2 +attrs==23.2.0 +Deprecated==1.2.14 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +packaging==23.2 +pluggy==1.4.0 +py==1.11.0 +py-cpuinfo==9.0.0 +pymemcache==1.3.5 +pytest==7.1.3 +pytest-benchmark==4.0.0 +six==1.16.0 +tomli==2.0.1 +typing_extensions==4.10.0 +wrapt==1.16.0 +zipp==3.17.0 +-e opentelemetry-instrumentation +-e instrumentation/opentelemetry-instrumentation-pymemcache diff --git a/instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-1.txt b/instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-1.txt new file mode 100644 index 0000000000..a1a3cc4fb1 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-1.txt @@ -0,0 +1,19 @@ +asgiref==3.7.2 +attrs==23.2.0 +Deprecated==1.2.14 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +packaging==23.2 +pluggy==1.4.0 +py==1.11.0 +py-cpuinfo==9.0.0 +pymemcache==2.2.2 +pytest==7.1.3 +pytest-benchmark==4.0.0 +six==1.16.0 +tomli==2.0.1 +typing_extensions==4.10.0 +wrapt==1.16.0 +zipp==3.17.0 +-e opentelemetry-instrumentation +-e instrumentation/opentelemetry-instrumentation-pymemcache diff --git a/instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-2.txt b/instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-2.txt new file mode 100644 index 0000000000..cb28ea22d7 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-2.txt @@ -0,0 +1,19 @@ +asgiref==3.7.2 +attrs==23.2.0 +Deprecated==1.2.14 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +packaging==23.2 +pluggy==1.4.0 +py==1.11.0 +py-cpuinfo==9.0.0 +pymemcache==3.4.1 +pytest==7.1.3 +pytest-benchmark==4.0.0 +six==1.16.0 +tomli==2.0.1 +typing_extensions==4.10.0 +wrapt==1.16.0 +zipp==3.17.0 +-e opentelemetry-instrumentation +-e instrumentation/opentelemetry-instrumentation-pymemcache diff --git a/instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-3.txt b/instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-3.txt new file mode 100644 index 0000000000..40152664ac --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-3.txt @@ -0,0 +1,19 @@ +asgiref==3.7.2 +attrs==23.2.0 +Deprecated==1.2.14 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +packaging==23.2 +pluggy==1.4.0 +py==1.11.0 +py-cpuinfo==9.0.0 +pymemcache==3.4.2 +pytest==7.1.3 +pytest-benchmark==4.0.0 +six==1.16.0 +tomli==2.0.1 +typing_extensions==4.10.0 +wrapt==1.16.0 +zipp==3.17.0 +-e opentelemetry-instrumentation +-e instrumentation/opentelemetry-instrumentation-pymemcache diff --git a/instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-4.txt b/instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-4.txt new file mode 100644 index 0000000000..9031276ce4 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-4.txt @@ -0,0 +1,18 @@ +asgiref==3.7.2 +attrs==23.2.0 +Deprecated==1.2.14 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +packaging==23.2 +pluggy==1.4.0 +py==1.11.0 +py-cpuinfo==9.0.0 +pymemcache==4.0.0 +pytest==7.1.3 +pytest-benchmark==4.0.0 +tomli==2.0.1 +typing_extensions==4.10.0 +wrapt==1.16.0 +zipp==3.17.0 +-e opentelemetry-instrumentation +-e instrumentation/opentelemetry-instrumentation-pymemcache diff --git a/tox.ini b/tox.ini index d7c30a8e7b..207de15380 100644 --- a/tox.ini +++ b/tox.ini @@ -158,8 +158,15 @@ envlist = pypy3-test-instrumentation-psycopg ; opentelemetry-instrumentation-pymemcache - py3{8,9,10,11}-test-instrumentation-pymemcache-{135,200,300,342,400} - pypy3-test-instrumentation-pymemcache-{135,200,300,342,400} + ; The numbers at the end of the environment names + ; below mean these dependencies are being used: + ; 0: pymemcache ==1.3.5 + ; 1: pymemcache >2.0.0,<3.0.0 + ; 2: pymemcache >3.0.0,<3.4.2 + ; 3: pymemcache ==3.4.2 + ; 4: pymemcache ==4.0.0 + py3{8,9,10,11}-test-instrumentation-pymemcache-{0,1,2,3,4} + pypy3-test-instrumentation-pymemcache-{0,1,2,3,4} ; opentelemetry-instrumentation-pymongo py3{8,9,10,11}-test-instrumentation-pymongo @@ -299,11 +306,6 @@ deps = sqlalchemy-14: sqlalchemy~=1.4 sio-pika-0: pika>=0.12.0,<1.0.0 sio-pika-1: pika>=1.0.0 - pymemcache-135: pymemcache ==1.3.5 - pymemcache-200: pymemcache >2.0.0,<3.0.0 - pymemcache-300: pymemcache >3.0.0,<3.4.2 - pymemcache-342: pymemcache ==3.4.2 - pymemcache-400: pymemcache ==4.0.0 ; FIXME: add coverage testing ; FIXME: add mypy testing @@ -387,7 +389,11 @@ commands_pre = mysqlclient: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-dbapi {toxinidir}/instrumentation/opentelemetry-instrumentation-mysqlclient[test] - pymemcache-{135,200,300,342,400}: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-pymemcache[test] + pymemcache-0: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-0.txt + pymemcache-1: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-1.txt + pymemcache-2: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-2.txt + pymemcache-3: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-3.txt + pymemcache-4: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-4.txt pymongo: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-pymongo[test] @@ -582,7 +588,7 @@ commands_pre = python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-kafka-python[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-confluent-kafka[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-logging[test] - python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-pymemcache[test] + pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-4.txt python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-psycopg[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-psycopg2[test] pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-aiohttp-client/test-requirements.txt From 8f02162221424106f06d7c551f4719e538acdf03 Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Fri, 15 Mar 2024 15:26:38 -0600 Subject: [PATCH 22/26] Remove [test] package from elasticsearch configuration (#2312) Fixes #3745 --- .../pyproject.toml | 5 --- .../test-requirements-0.txt | 22 +++++++++++++ .../test-requirements-1.txt | 22 +++++++++++++ .../test-requirements-2.txt | 22 +++++++++++++ tox.ini | 31 +++++++++---------- 5 files changed, 80 insertions(+), 22 deletions(-) create mode 100644 instrumentation/opentelemetry-instrumentation-elasticsearch/test-requirements-0.txt create mode 100644 instrumentation/opentelemetry-instrumentation-elasticsearch/test-requirements-1.txt create mode 100644 instrumentation/opentelemetry-instrumentation-elasticsearch/test-requirements-2.txt diff --git a/instrumentation/opentelemetry-instrumentation-elasticsearch/pyproject.toml b/instrumentation/opentelemetry-instrumentation-elasticsearch/pyproject.toml index c716769f5c..987cfb17c1 100644 --- a/instrumentation/opentelemetry-instrumentation-elasticsearch/pyproject.toml +++ b/instrumentation/opentelemetry-instrumentation-elasticsearch/pyproject.toml @@ -34,11 +34,6 @@ dependencies = [ instruments = [ "elasticsearch >= 2.0", ] -test = [ - "opentelemetry-instrumentation-elasticsearch[instruments]", - "elasticsearch-dsl >= 2.0", - "opentelemetry-test-utils == 0.45b0.dev", -] [project.entry-points.opentelemetry_instrumentor] elasticsearch = "opentelemetry.instrumentation.elasticsearch:ElasticsearchInstrumentor" diff --git a/instrumentation/opentelemetry-instrumentation-elasticsearch/test-requirements-0.txt b/instrumentation/opentelemetry-instrumentation-elasticsearch/test-requirements-0.txt new file mode 100644 index 0000000000..216d1c0b02 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-elasticsearch/test-requirements-0.txt @@ -0,0 +1,22 @@ +asgiref==3.7.2 +attrs==23.2.0 +Deprecated==1.2.14 +elasticsearch==2.4.1 +elasticsearch-dsl==2.2.0 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +packaging==23.2 +pluggy==1.4.0 +py==1.11.0 +py-cpuinfo==9.0.0 +pytest==7.1.3 +pytest-benchmark==4.0.0 +python-dateutil==2.8.2 +six==1.16.0 +tomli==2.0.1 +typing_extensions==4.10.0 +urllib3==1.26.18 +wrapt==1.16.0 +zipp==3.17.0 +-e opentelemetry-instrumentation +-e instrumentation/opentelemetry-instrumentation-elasticsearch diff --git a/instrumentation/opentelemetry-instrumentation-elasticsearch/test-requirements-1.txt b/instrumentation/opentelemetry-instrumentation-elasticsearch/test-requirements-1.txt new file mode 100644 index 0000000000..2c51c87508 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-elasticsearch/test-requirements-1.txt @@ -0,0 +1,22 @@ +asgiref==3.7.2 +attrs==23.2.0 +Deprecated==1.2.14 +elasticsearch==5.5.3 +elasticsearch-dsl==5.4.0 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +packaging==23.2 +pluggy==1.4.0 +py==1.11.0 +py-cpuinfo==9.0.0 +pytest==7.1.3 +pytest-benchmark==4.0.0 +python-dateutil==2.8.2 +six==1.16.0 +tomli==2.0.1 +typing_extensions==4.10.0 +urllib3==2.2.1 +wrapt==1.16.0 +zipp==3.17.0 +-e opentelemetry-instrumentation +-e instrumentation/opentelemetry-instrumentation-elasticsearch diff --git a/instrumentation/opentelemetry-instrumentation-elasticsearch/test-requirements-2.txt b/instrumentation/opentelemetry-instrumentation-elasticsearch/test-requirements-2.txt new file mode 100644 index 0000000000..4bd1d0d318 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-elasticsearch/test-requirements-2.txt @@ -0,0 +1,22 @@ +asgiref==3.7.2 +attrs==23.2.0 +Deprecated==1.2.14 +elasticsearch==6.8.2 +elasticsearch-dsl==6.4.0 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +packaging==23.2 +pluggy==1.4.0 +py==1.11.0 +py-cpuinfo==9.0.0 +pytest==7.1.3 +pytest-benchmark==4.0.0 +python-dateutil==2.8.2 +six==1.16.0 +tomli==2.0.1 +typing_extensions==4.10.0 +urllib3==2.2.1 +wrapt==1.16.0 +zipp==3.17.0 +-e opentelemetry-instrumentation +-e instrumentation/opentelemetry-instrumentation-elasticsearch diff --git a/tox.ini b/tox.ini index 207de15380..dbd1a8ad15 100644 --- a/tox.ini +++ b/tox.ini @@ -75,10 +75,16 @@ envlist = ; pypy3-test-instrumentation-boto ; opentelemetry-instrumentation-elasticsearch - py3{8,9,10,11}-test-instrumentation-elasticsearch-{2,6} - pypy3-test-instrumentation-elasticsearch-{2,6} - py3{8,9}-test-instrumentation-elasticsearch-5 - pypy3-test-instrumentation-elasticsearch-5 + ; FIXME: Elasticsearch >=7 causes CI workflow tests to hang, see open-telemetry/opentelemetry-python-contrib#620 + ; The numbers at the end of the environment names + ; below mean these dependencies are being used: + ; 0: elasticsearch-dsl>=2.0,<3.0 elasticsearch>=2.0,<3.0 + ; 1: elasticsearch-dsl>=5.0,<6.0 elasticsearch>=5.0,<6.0 + ; 2: elasticsearch-dsl>=6.0,<7.0 elasticsearch>=6.0,<7.0 + py3{8,9,10,11}-test-instrumentation-elasticsearch-{0,2} + pypy3-test-instrumentation-elasticsearch-{0,2} + py3{8,9}-test-instrumentation-elasticsearch-1 + pypy3-test-instrumentation-elasticsearch-1 ; opentelemetry-instrumentation-falcon ; py310 does not work with falcon 1 @@ -289,17 +295,6 @@ deps = test: pytest-benchmark coverage: pytest coverage: pytest-cov - elasticsearch-2: elasticsearch-dsl>=2.0,<3.0 - elasticsearch-2: elasticsearch>=2.0,<3.0 - elasticsearch-5: elasticsearch-dsl>=5.0,<6.0 - elasticsearch-5: elasticsearch>=5.0,<6.0 - elasticsearch-6: elasticsearch-dsl>=6.0,<7.0 - elasticsearch-6: elasticsearch>=6.0,<7.0 - ; FIXME: Elasticsearch >=7 causes CI workflow tests to hang, see open-telemetry/opentelemetry-python-contrib#620 - ; elasticsearch-7: elasticsearch-dsl>=7.0,<8.0 - ; elasticsearch-7: elasticsearch>=7.0,<8.0 - ; elasticsearch-8: elasticsearch-dsl>=8.0,<9.0 - ; elasticsearch-8: elasticsearch>=8.0,<9.0 grpc: pytest-asyncio sqlalchemy-11: sqlalchemy>=1.1,<1.2 sqlalchemy-14: aiosqlite @@ -441,7 +436,9 @@ commands_pre = sqlalchemy-{11,14}: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-sqlalchemy[test] - elasticsearch-{2,5,6}: pip install {toxinidir}/opentelemetry-instrumentation[test] {toxinidir}/instrumentation/opentelemetry-instrumentation-elasticsearch[test] + elasticsearch-0: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-elasticsearch/test-requirements-0.txt + elasticsearch-1: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-elasticsearch/test-requirements-1.txt + elasticsearch-2: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-elasticsearch/test-requirements-2.txt asyncio: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-asyncio/test-requirements.txt @@ -604,7 +601,7 @@ commands_pre = # for your OS to install the required dependencies python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-mysqlclient[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-pymongo[test] - python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-elasticsearch[test] + pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-elasticsearch/test-requirements-2.txt python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-asyncpg[test] pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-tornado/test-requirements.txt python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-tortoiseorm[test] From 223c79c6174acdb42459de99663166b603075e2f Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Fri, 15 Mar 2024 23:37:18 -0600 Subject: [PATCH 23/26] Remove [test] package from mysqlclient instrumentation (#2295) Fixes #2208 --- .../pyproject.toml | 4 ---- .../test-requirements.txt | 19 +++++++++++++++++++ tox.ini | 4 ++-- 3 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 instrumentation/opentelemetry-instrumentation-mysqlclient/test-requirements.txt diff --git a/instrumentation/opentelemetry-instrumentation-mysqlclient/pyproject.toml b/instrumentation/opentelemetry-instrumentation-mysqlclient/pyproject.toml index de8c31a1f3..7646a9be2b 100644 --- a/instrumentation/opentelemetry-instrumentation-mysqlclient/pyproject.toml +++ b/instrumentation/opentelemetry-instrumentation-mysqlclient/pyproject.toml @@ -33,10 +33,6 @@ dependencies = [ instruments = [ "mysqlclient < 3", ] -test = [ - "opentelemetry-instrumentation-mysqlclient[instruments]", - "opentelemetry-test-utils == 0.45b0.dev", -] [project.entry-points.opentelemetry_instrumentor] mysqlclient = "opentelemetry.instrumentation.mysqlclient:MySQLClientInstrumentor" diff --git a/instrumentation/opentelemetry-instrumentation-mysqlclient/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-mysqlclient/test-requirements.txt new file mode 100644 index 0000000000..afa2ccae6c --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-mysqlclient/test-requirements.txt @@ -0,0 +1,19 @@ +asgiref==3.7.2 +attrs==23.2.0 +Deprecated==1.2.14 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +mysqlclient==2.2.4 +packaging==23.2 +pluggy==1.4.0 +py==1.11.0 +py-cpuinfo==9.0.0 +pytest==7.1.3 +pytest-benchmark==4.0.0 +tomli==2.0.1 +typing_extensions==4.9.0 +wrapt==1.16.0 +zipp==3.17.0 +-e opentelemetry-instrumentation +-e instrumentation/opentelemetry-instrumentation-dbapi +-e instrumentation/opentelemetry-instrumentation-mysqlclient diff --git a/tox.ini b/tox.ini index dbd1a8ad15..8ac6a4606f 100644 --- a/tox.ini +++ b/tox.ini @@ -382,7 +382,7 @@ commands_pre = mysql: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-dbapi {toxinidir}/instrumentation/opentelemetry-instrumentation-mysql[test] - mysqlclient: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-dbapi {toxinidir}/instrumentation/opentelemetry-instrumentation-mysqlclient[test] + mysqlclient: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-mysqlclient/test-requirements.txt pymemcache-0: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-0.txt pymemcache-1: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-1.txt @@ -599,7 +599,7 @@ commands_pre = python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-pymysql[test] # prerequisite: follow the instructions here https://github.com/PyMySQL/mysqlclient#install # for your OS to install the required dependencies - python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-mysqlclient[test] + pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-mysqlclient/test-requirements.txt python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-pymongo[test] pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-elasticsearch/test-requirements-2.txt python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-asyncpg[test] From 617cae937553817dde303a8ba1ba933ca205917e Mon Sep 17 00:00:00 2001 From: Rodrigo-Novas Date: Mon, 18 Mar 2024 12:29:10 -0300 Subject: [PATCH 24/26] Feature/convention http server duration (#2326) * feat: add http.duration convention * feat: add http.duration convention * feat: replace for the last description version Duration of HTTP client requests * feat: add new description to histogram --- CHANGELOG.md | 3 ++- .../opentelemetry/instrumentation/aiohttp_server/__init__.py | 2 +- .../src/opentelemetry/instrumentation/asgi/__init__.py | 2 +- .../src/opentelemetry/instrumentation/django/__init__.py | 2 +- .../src/opentelemetry/instrumentation/falcon/__init__.py | 2 +- .../src/opentelemetry/instrumentation/flask/__init__.py | 4 ++-- .../src/opentelemetry/instrumentation/pyramid/callbacks.py | 2 +- .../src/opentelemetry/instrumentation/tornado/__init__.py | 2 +- .../src/opentelemetry/instrumentation/wsgi/__init__.py | 2 +- 9 files changed, 11 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7bbe579232..d1f8850790 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,13 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased -### Fixed - `opentelemetry-instrumentation-celery` Allow Celery instrumentation to be installed multiple times ([#2342](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2342)) - Align gRPC span status codes to OTEL specification ([#1756](https://github.com/open-telemetry/opentelemetry-python-contrib/issues/1756)) - `opentelemetry-instrumentation-flask` Add importlib metadata default for deprecation warning flask version ([#2297](https://github.com/open-telemetry/opentelemetry-python-contrib/issues/2297)) +- Ensure all http.server.duration metrics have the same description + ([#2151](https://github.com/open-telemetry/opentelemetry-python-contrib/issues/2298)) ## Version 1.23.0/0.44b0 (2024-02-23) diff --git a/instrumentation/opentelemetry-instrumentation-aiohttp-server/src/opentelemetry/instrumentation/aiohttp_server/__init__.py b/instrumentation/opentelemetry-instrumentation-aiohttp-server/src/opentelemetry/instrumentation/aiohttp_server/__init__.py index 914f005b2a..c1ab960818 100644 --- a/instrumentation/opentelemetry-instrumentation-aiohttp-server/src/opentelemetry/instrumentation/aiohttp_server/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-aiohttp-server/src/opentelemetry/instrumentation/aiohttp_server/__init__.py @@ -207,7 +207,7 @@ async def middleware(request, handler): duration_histogram = meter.create_histogram( name=MetricInstruments.HTTP_SERVER_DURATION, unit="ms", - description="measures the duration of the inbound HTTP request", + description="Duration of HTTP client requests.", ) active_requests_counter = meter.create_up_down_counter( diff --git a/instrumentation/opentelemetry-instrumentation-asgi/src/opentelemetry/instrumentation/asgi/__init__.py b/instrumentation/opentelemetry-instrumentation-asgi/src/opentelemetry/instrumentation/asgi/__init__.py index dba7414cb1..d179f4fafa 100644 --- a/instrumentation/opentelemetry-instrumentation-asgi/src/opentelemetry/instrumentation/asgi/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-asgi/src/opentelemetry/instrumentation/asgi/__init__.py @@ -492,7 +492,7 @@ def __init__( self.duration_histogram = self.meter.create_histogram( name=MetricInstruments.HTTP_SERVER_DURATION, unit="ms", - description="measures the duration of the inbound HTTP request", + description="Duration of HTTP client requests.", ) self.server_response_size_histogram = self.meter.create_histogram( name=MetricInstruments.HTTP_SERVER_RESPONSE_SIZE, diff --git a/instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django/__init__.py b/instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django/__init__.py index 583f1adeb6..37ac760283 100644 --- a/instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django/__init__.py @@ -322,7 +322,7 @@ def _instrument(self, **kwargs): _DjangoMiddleware._duration_histogram = meter.create_histogram( name=MetricInstruments.HTTP_SERVER_DURATION, unit="ms", - description="measures the duration of the inbound http request", + description="Duration of HTTP client requests.", ) _DjangoMiddleware._active_request_counter = meter.create_up_down_counter( name=MetricInstruments.HTTP_SERVER_ACTIVE_REQUESTS, diff --git a/instrumentation/opentelemetry-instrumentation-falcon/src/opentelemetry/instrumentation/falcon/__init__.py b/instrumentation/opentelemetry-instrumentation-falcon/src/opentelemetry/instrumentation/falcon/__init__.py index d6cf8249a4..06a550cf3f 100644 --- a/instrumentation/opentelemetry-instrumentation-falcon/src/opentelemetry/instrumentation/falcon/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-falcon/src/opentelemetry/instrumentation/falcon/__init__.py @@ -268,7 +268,7 @@ def __init__(self, *args, **kwargs): self.duration_histogram = self._otel_meter.create_histogram( name=MetricInstruments.HTTP_SERVER_DURATION, unit="ms", - description="measures the duration of the inbound HTTP request", + description="Duration of HTTP client requests.", ) self.active_requests_counter = self._otel_meter.create_up_down_counter( name=MetricInstruments.HTTP_SERVER_ACTIVE_REQUESTS, diff --git a/instrumentation/opentelemetry-instrumentation-flask/src/opentelemetry/instrumentation/flask/__init__.py b/instrumentation/opentelemetry-instrumentation-flask/src/opentelemetry/instrumentation/flask/__init__.py index a2b85d67f8..ba1031655e 100644 --- a/instrumentation/opentelemetry-instrumentation-flask/src/opentelemetry/instrumentation/flask/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-flask/src/opentelemetry/instrumentation/flask/__init__.py @@ -506,7 +506,7 @@ def __init__(self, *args, **kwargs): duration_histogram = meter.create_histogram( name=MetricInstruments.HTTP_SERVER_DURATION, unit="ms", - description="measures the duration of the inbound HTTP request", + description="Duration of HTTP client requests.", ) active_requests_counter = meter.create_up_down_counter( name=MetricInstruments.HTTP_SERVER_ACTIVE_REQUESTS, @@ -612,7 +612,7 @@ def instrument_app( duration_histogram = meter.create_histogram( name=MetricInstruments.HTTP_SERVER_DURATION, unit="ms", - description="measures the duration of the inbound HTTP request", + description="Duration of HTTP client requests.", ) active_requests_counter = meter.create_up_down_counter( name=MetricInstruments.HTTP_SERVER_ACTIVE_REQUESTS, diff --git a/instrumentation/opentelemetry-instrumentation-pyramid/src/opentelemetry/instrumentation/pyramid/callbacks.py b/instrumentation/opentelemetry-instrumentation-pyramid/src/opentelemetry/instrumentation/pyramid/callbacks.py index e3675fcfab..4f17da3da5 100644 --- a/instrumentation/opentelemetry-instrumentation-pyramid/src/opentelemetry/instrumentation/pyramid/callbacks.py +++ b/instrumentation/opentelemetry-instrumentation-pyramid/src/opentelemetry/instrumentation/pyramid/callbacks.py @@ -140,7 +140,7 @@ def trace_tween_factory(handler, registry): duration_histogram = meter.create_histogram( name=MetricInstruments.HTTP_SERVER_DURATION, unit="ms", - description="measures the duration of the inbound HTTP request", + description="Duration of HTTP client requests.", ) active_requests_counter = meter.create_up_down_counter( name=MetricInstruments.HTTP_SERVER_ACTIVE_REQUESTS, diff --git a/instrumentation/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/__init__.py b/instrumentation/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/__init__.py index dfa4b217df..5a39538837 100644 --- a/instrumentation/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/__init__.py @@ -296,7 +296,7 @@ def _create_server_histograms(meter) -> Dict[str, Histogram]: MetricInstruments.HTTP_SERVER_DURATION: meter.create_histogram( name=MetricInstruments.HTTP_SERVER_DURATION, unit="ms", - description="measures the duration outbound HTTP requests", + description="Duration of HTTP client requests.", ), MetricInstruments.HTTP_SERVER_REQUEST_SIZE: meter.create_histogram( name=MetricInstruments.HTTP_SERVER_REQUEST_SIZE, diff --git a/instrumentation/opentelemetry-instrumentation-wsgi/src/opentelemetry/instrumentation/wsgi/__init__.py b/instrumentation/opentelemetry-instrumentation-wsgi/src/opentelemetry/instrumentation/wsgi/__init__.py index 87c73cc737..afa1bf2a55 100644 --- a/instrumentation/opentelemetry-instrumentation-wsgi/src/opentelemetry/instrumentation/wsgi/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-wsgi/src/opentelemetry/instrumentation/wsgi/__init__.py @@ -507,7 +507,7 @@ def __init__( self.duration_histogram = self.meter.create_histogram( name=MetricInstruments.HTTP_SERVER_DURATION, unit="ms", - description="measures the duration of the inbound HTTP request", + description="Duration of HTTP client requests.", ) self.active_requests_counter = self.meter.create_up_down_counter( name=MetricInstruments.HTTP_SERVER_ACTIVE_REQUESTS, From 6c2e54da6490d4b04497f201d3c9d17537a32bac Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Mon, 18 Mar 2024 12:44:02 -0600 Subject: [PATCH 25/26] Remove [test] package from sqlalchemy instrumentation (#2315) Fixes #2219 Co-authored-by: Shalev Roda <65566801+shalevr@users.noreply.github.com> --- .../pyproject.toml | 5 ----- .../test-requirements-0.txt | 22 +++++++++++++++++++ .../test-requirements-1.txt | 20 +++++++++++++++++ tox.ini | 16 ++++++++------ 4 files changed, 51 insertions(+), 12 deletions(-) create mode 100644 instrumentation/opentelemetry-instrumentation-sqlalchemy/test-requirements-0.txt create mode 100644 instrumentation/opentelemetry-instrumentation-sqlalchemy/test-requirements-1.txt diff --git a/instrumentation/opentelemetry-instrumentation-sqlalchemy/pyproject.toml b/instrumentation/opentelemetry-instrumentation-sqlalchemy/pyproject.toml index 1c63d671b7..bf5759e57b 100644 --- a/instrumentation/opentelemetry-instrumentation-sqlalchemy/pyproject.toml +++ b/instrumentation/opentelemetry-instrumentation-sqlalchemy/pyproject.toml @@ -35,11 +35,6 @@ dependencies = [ instruments = [ "sqlalchemy", ] -test = [ - "opentelemetry-instrumentation-sqlalchemy[instruments]", - "opentelemetry-sdk ~= 1.12", - "pytest", -] [project.entry-points.opentelemetry_instrumentor] sqlalchemy = "opentelemetry.instrumentation.sqlalchemy:SQLAlchemyInstrumentor" diff --git a/instrumentation/opentelemetry-instrumentation-sqlalchemy/test-requirements-0.txt b/instrumentation/opentelemetry-instrumentation-sqlalchemy/test-requirements-0.txt new file mode 100644 index 0000000000..26fd283824 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-sqlalchemy/test-requirements-0.txt @@ -0,0 +1,22 @@ +asgiref==3.7.2 +attrs==23.2.0 +cffi==1.15.1 +Deprecated==1.2.14 +greenlet==0.4.13 +hpy==0.0.4.dev179+g9b5d200 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +packaging==23.2 +pluggy==1.4.0 +py==1.11.0 +py-cpuinfo==9.0.0 +pytest==7.1.3 +pytest-benchmark==4.0.0 +readline==6.2.4.1 +SQLAlchemy==1.1.18 +tomli==2.0.1 +typing_extensions==4.10.0 +wrapt==1.16.0 +zipp==3.17.0 +-e opentelemetry-instrumentation +-e instrumentation/opentelemetry-instrumentation-sqlalchemy diff --git a/instrumentation/opentelemetry-instrumentation-sqlalchemy/test-requirements-1.txt b/instrumentation/opentelemetry-instrumentation-sqlalchemy/test-requirements-1.txt new file mode 100644 index 0000000000..bfb9dac972 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-sqlalchemy/test-requirements-1.txt @@ -0,0 +1,20 @@ +aiosqlite==0.20.0 +asgiref==3.7.2 +attrs==23.2.0 +Deprecated==1.2.14 +greenlet==3.0.3 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +packaging==23.2 +pluggy==1.4.0 +py==1.11.0 +py-cpuinfo==9.0.0 +pytest==7.1.3 +pytest-benchmark==4.0.0 +SQLAlchemy==1.4.51 +tomli==2.0.1 +typing_extensions==4.10.0 +wrapt==1.16.0 +zipp==3.17.0 +-e opentelemetry-instrumentation +-e instrumentation/opentelemetry-instrumentation-sqlalchemy diff --git a/tox.ini b/tox.ini index 8ac6a4606f..185ed7cf1c 100644 --- a/tox.ini +++ b/tox.ini @@ -207,8 +207,12 @@ envlist = pypy3-test-instrumentation-grpc ; opentelemetry-instrumentation-sqlalchemy - py3{8,9,10,11}-test-instrumentation-sqlalchemy-{14} - pypy3-test-instrumentation-sqlalchemy-{11,14} + ; The numbers at the end of the environment names + ; below mean these dependencies are being used: + ; 0: sqlalchemy>=1.1,<1.2 + ; 1: sqlalchemy~=1.4 aiosqlite + py3{8,9,10,11}-test-instrumentation-sqlalchemy-{1} + pypy3-test-instrumentation-sqlalchemy-{0,1} ; opentelemetry-instrumentation-redis py3{8,9,10,11}-test-instrumentation-redis @@ -296,9 +300,6 @@ deps = coverage: pytest coverage: pytest-cov grpc: pytest-asyncio - sqlalchemy-11: sqlalchemy>=1.1,<1.2 - sqlalchemy-14: aiosqlite - sqlalchemy-14: sqlalchemy~=1.4 sio-pika-0: pika>=0.12.0,<1.0.0 sio-pika-1: pika>=1.0.0 @@ -434,7 +435,8 @@ commands_pre = sklearn: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-sklearn[test] - sqlalchemy-{11,14}: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-sqlalchemy[test] + sqlalchemy-0: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-sqlalchemy/test-requirements-0.txt + sqlalchemy-1: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-sqlalchemy/test-requirements-1.txt elasticsearch-0: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-elasticsearch/test-requirements-0.txt elasticsearch-1: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-elasticsearch/test-requirements-1.txt @@ -572,7 +574,7 @@ commands_pre = pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-falcon/test-requirements-2.txt python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-boto[test] pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-flask/test-requirements-2.txt - python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-sqlalchemy[test] + pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-sqlalchemy/test-requirements-1.txt python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-cassandra[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-celery[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-pika[test] From 1782e96b7750aef8b0443ba46ddec7be703cade6 Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Mon, 18 Mar 2024 13:42:10 -0600 Subject: [PATCH 26/26] Remove [test] package from dbapi instrumentation (#2288) Fixes #2197 --- .../pyproject.toml | 3 --- .../test-requirements.txt | 17 +++++++++++++++++ tox.ini | 4 ++-- 3 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 instrumentation/opentelemetry-instrumentation-dbapi/test-requirements.txt diff --git a/instrumentation/opentelemetry-instrumentation-dbapi/pyproject.toml b/instrumentation/opentelemetry-instrumentation-dbapi/pyproject.toml index 3032c12da6..5ae0f09376 100644 --- a/instrumentation/opentelemetry-instrumentation-dbapi/pyproject.toml +++ b/instrumentation/opentelemetry-instrumentation-dbapi/pyproject.toml @@ -32,9 +32,6 @@ dependencies = [ [project.optional-dependencies] instruments = [] -test = [ - "opentelemetry-test-utils == 0.45b0.dev", -] [project.urls] Homepage = "https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation/opentelemetry-instrumentation-dbapi" diff --git a/instrumentation/opentelemetry-instrumentation-dbapi/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-dbapi/test-requirements.txt new file mode 100644 index 0000000000..46c02707c1 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-dbapi/test-requirements.txt @@ -0,0 +1,17 @@ +asgiref==3.7.2 +attrs==23.2.0 +Deprecated==1.2.14 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +packaging==23.2 +pluggy==1.4.0 +py==1.11.0 +py-cpuinfo==9.0.0 +pytest==7.1.3 +pytest-benchmark==4.0.0 +tomli==2.0.1 +typing_extensions==4.9.0 +wrapt==1.16.0 +zipp==3.17.0 +-e opentelemetry-instrumentation +-e instrumentation/opentelemetry-instrumentation-dbapi diff --git a/tox.ini b/tox.ini index 185ed7cf1c..45bf97bf8b 100644 --- a/tox.ini +++ b/tox.ini @@ -369,7 +369,7 @@ commands_pre = cassandra: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-cassandra[test] - dbapi: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-dbapi[test] + dbapi: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-dbapi/test-requirements.txt py3{8,9}-test-instrumentation-django-0: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-django/test-requirements-0.txt py3{8,9}-test-instrumentation-django-1: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-django/test-requirements-1.txt @@ -564,8 +564,8 @@ commands_pre = python -m pip install -e {toxinidir}/util/opentelemetry-util-http[test] python -m pip install -e {toxinidir}/opentelemetry-instrumentation[test] pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-wsgi/test-requirements.txt - python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-dbapi[test] pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-asgi/test-requirements.txt + pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-dbapi/test-requirements.txt python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-botocore[test] python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-boto3sqs[test] pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-django/test-requirements-3.txt