From 33f55add0fe69411ea3a7b1177a22e4f118843df Mon Sep 17 00:00:00 2001 From: emdneto <9735060+emdneto@users.noreply.github.com> Date: Thu, 7 Nov 2024 13:33:04 -0300 Subject: [PATCH 1/6] fix instruments version constraint for sqlalchemy Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com> --- .../opentelemetry-instrumentation-sqlalchemy/pyproject.toml | 2 +- .../src/opentelemetry/instrumentation/sqlalchemy/package.py | 2 +- .../test-requirements-1.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/instrumentation/opentelemetry-instrumentation-sqlalchemy/pyproject.toml b/instrumentation/opentelemetry-instrumentation-sqlalchemy/pyproject.toml index f8ce651b6c..4ba1a67a88 100644 --- a/instrumentation/opentelemetry-instrumentation-sqlalchemy/pyproject.toml +++ b/instrumentation/opentelemetry-instrumentation-sqlalchemy/pyproject.toml @@ -34,7 +34,7 @@ dependencies = [ [project.optional-dependencies] instruments = [ - "sqlalchemy", + "sqlalchemy >= 1.0.0, < 3.0.0", ] [project.entry-points.opentelemetry_instrumentor] diff --git a/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/package.py b/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/package.py index e3029f57b6..322e8302bc 100644 --- a/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/package.py +++ b/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/package.py @@ -12,6 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -_instruments = ("sqlalchemy",) +_instruments = ("sqlalchemy >= 1.0.0, < 2.0.0",) _supports_metrics = True diff --git a/instrumentation/opentelemetry-instrumentation-sqlalchemy/test-requirements-1.txt b/instrumentation/opentelemetry-instrumentation-sqlalchemy/test-requirements-1.txt index 885cee8c62..5ccc30f4b0 100644 --- a/instrumentation/opentelemetry-instrumentation-sqlalchemy/test-requirements-1.txt +++ b/instrumentation/opentelemetry-instrumentation-sqlalchemy/test-requirements-1.txt @@ -7,7 +7,7 @@ packaging==24.0 pluggy==1.5.0 py-cpuinfo==9.0.0 pytest==7.4.4 -SQLAlchemy==1.4.51 +SQLAlchemy==1.4.54 tomli==2.0.1 typing_extensions==4.12.2 wrapt==1.16.0 From f14c707ba8c219f5d5836d3119ffcf9b1d9375db Mon Sep 17 00:00:00 2001 From: emdneto <9735060+emdneto@users.noreply.github.com> Date: Thu, 7 Nov 2024 13:36:35 -0300 Subject: [PATCH 2/6] run tox generate Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com> --- instrumentation/README.md | 2 +- .../src/opentelemetry/instrumentation/bootstrap_gen.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/instrumentation/README.md b/instrumentation/README.md index 6bb47f6f9c..066c974e2d 100644 --- a/instrumentation/README.md +++ b/instrumentation/README.md @@ -39,7 +39,7 @@ | [opentelemetry-instrumentation-redis](./opentelemetry-instrumentation-redis) | redis >= 2.6 | No | experimental | [opentelemetry-instrumentation-remoulade](./opentelemetry-instrumentation-remoulade) | remoulade >= 0.50 | No | experimental | [opentelemetry-instrumentation-requests](./opentelemetry-instrumentation-requests) | requests ~= 2.0 | Yes | migration -| [opentelemetry-instrumentation-sqlalchemy](./opentelemetry-instrumentation-sqlalchemy) | sqlalchemy | Yes | experimental +| [opentelemetry-instrumentation-sqlalchemy](./opentelemetry-instrumentation-sqlalchemy) | sqlalchemy >= 1.0.0, < 2.0.0 | Yes | experimental | [opentelemetry-instrumentation-sqlite3](./opentelemetry-instrumentation-sqlite3) | sqlite3 | No | experimental | [opentelemetry-instrumentation-starlette](./opentelemetry-instrumentation-starlette) | starlette ~= 0.13.0 | Yes | experimental | [opentelemetry-instrumentation-system-metrics](./opentelemetry-instrumentation-system-metrics) | psutil >= 5 | No | experimental diff --git a/opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap_gen.py b/opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap_gen.py index 8192b1fff9..540cee7346 100644 --- a/opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap_gen.py +++ b/opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap_gen.py @@ -161,7 +161,7 @@ "instrumentation": "opentelemetry-instrumentation-requests==0.50b0.dev", }, { - "library": "sqlalchemy", + "library": "sqlalchemy >= 1.0.0, < 3.0.0", "instrumentation": "opentelemetry-instrumentation-sqlalchemy==0.50b0.dev", }, { From 756924b9bce7e646030318cb24e16303a1a71be6 Mon Sep 17 00:00:00 2001 From: emdneto <9735060+emdneto@users.noreply.github.com> Date: Thu, 7 Nov 2024 13:38:35 -0300 Subject: [PATCH 3/6] fix version upper bound Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com> --- .../opentelemetry-instrumentation-sqlalchemy/pyproject.toml | 2 +- .../src/opentelemetry/instrumentation/bootstrap_gen.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/instrumentation/opentelemetry-instrumentation-sqlalchemy/pyproject.toml b/instrumentation/opentelemetry-instrumentation-sqlalchemy/pyproject.toml index 4ba1a67a88..37be575965 100644 --- a/instrumentation/opentelemetry-instrumentation-sqlalchemy/pyproject.toml +++ b/instrumentation/opentelemetry-instrumentation-sqlalchemy/pyproject.toml @@ -34,7 +34,7 @@ dependencies = [ [project.optional-dependencies] instruments = [ - "sqlalchemy >= 1.0.0, < 3.0.0", + "sqlalchemy >= 1.0.0, < 2.0.0", ] [project.entry-points.opentelemetry_instrumentor] diff --git a/opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap_gen.py b/opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap_gen.py index 540cee7346..97fc638c24 100644 --- a/opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap_gen.py +++ b/opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap_gen.py @@ -161,7 +161,7 @@ "instrumentation": "opentelemetry-instrumentation-requests==0.50b0.dev", }, { - "library": "sqlalchemy >= 1.0.0, < 3.0.0", + "library": "sqlalchemy >= 1.0.0, < 2.0.0", "instrumentation": "opentelemetry-instrumentation-sqlalchemy==0.50b0.dev", }, { From 40b7460be32a7e9ed30598258eb19cd10c45d3db Mon Sep 17 00:00:00 2001 From: emdneto <9735060+emdneto@users.noreply.github.com> Date: Thu, 7 Nov 2024 13:45:30 -0300 Subject: [PATCH 4/6] add changelog Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com> --- CHANGELOG.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d0794f81a2..56465d24d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +### Added + +### Fixed + +### Breaking changes + +- `opentelemetry-instrumentation-sqlalchemy` teach instruments version + ([#2971](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2971)) + ## Version 1.28.0/0.49b0 (2024-11-05) ### Added @@ -30,7 +39,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `opentelemetry-instrumentation-aiokafka` Wrap `AIOKafkaConsumer.getone()` instead of `AIOKafkaConsumer.__anext__` ([#2874](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2874)) -- `opentelemetry-instrumentation-confluent-kafka` Fix to allow `topic` to be extracted from `kwargs` in `produce()` +- `opentelemetry-instrumentation-confluent-kafka` Fix to allow `topic` to be extracted from `kwargs` in `produce()` ([#2901])(https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2901) - `opentelemetry-instrumentation-system-metrics` Update metric units to conform to UCUM conventions. ([#2922](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2922)) From ef5892e34d4ad25cdb464e5adc27ecb367b53227 Mon Sep 17 00:00:00 2001 From: emdneto <9735060+emdneto@users.noreply.github.com> Date: Thu, 7 Nov 2024 20:06:51 -0300 Subject: [PATCH 5/6] change upper bound version to 2.1.0 Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com> --- instrumentation/README.md | 2 +- .../opentelemetry-instrumentation-sqlalchemy/pyproject.toml | 2 +- .../src/opentelemetry/instrumentation/sqlalchemy/package.py | 2 +- .../src/opentelemetry/instrumentation/bootstrap_gen.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/instrumentation/README.md b/instrumentation/README.md index c3d5262bb6..fb601266ea 100644 --- a/instrumentation/README.md +++ b/instrumentation/README.md @@ -39,7 +39,7 @@ | [opentelemetry-instrumentation-redis](./opentelemetry-instrumentation-redis) | redis >= 2.6 | No | experimental | [opentelemetry-instrumentation-remoulade](./opentelemetry-instrumentation-remoulade) | remoulade >= 0.50 | No | experimental | [opentelemetry-instrumentation-requests](./opentelemetry-instrumentation-requests) | requests ~= 2.0 | Yes | migration -| [opentelemetry-instrumentation-sqlalchemy](./opentelemetry-instrumentation-sqlalchemy) | sqlalchemy >= 1.0.0, < 2.0.0 | Yes | experimental +| [opentelemetry-instrumentation-sqlalchemy](./opentelemetry-instrumentation-sqlalchemy) | sqlalchemy >= 1.0.0, < 2.1.0 | Yes | experimental | [opentelemetry-instrumentation-sqlite3](./opentelemetry-instrumentation-sqlite3) | sqlite3 | No | experimental | [opentelemetry-instrumentation-starlette](./opentelemetry-instrumentation-starlette) | starlette ~= 0.13.0 | Yes | experimental | [opentelemetry-instrumentation-system-metrics](./opentelemetry-instrumentation-system-metrics) | psutil >= 5 | No | experimental diff --git a/instrumentation/opentelemetry-instrumentation-sqlalchemy/pyproject.toml b/instrumentation/opentelemetry-instrumentation-sqlalchemy/pyproject.toml index 37be575965..d6d8c7aff9 100644 --- a/instrumentation/opentelemetry-instrumentation-sqlalchemy/pyproject.toml +++ b/instrumentation/opentelemetry-instrumentation-sqlalchemy/pyproject.toml @@ -34,7 +34,7 @@ dependencies = [ [project.optional-dependencies] instruments = [ - "sqlalchemy >= 1.0.0, < 2.0.0", + "sqlalchemy >= 1.0.0, < 2.1.0", ] [project.entry-points.opentelemetry_instrumentor] diff --git a/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/package.py b/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/package.py index 322e8302bc..77b148e51c 100644 --- a/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/package.py +++ b/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/package.py @@ -12,6 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -_instruments = ("sqlalchemy >= 1.0.0, < 2.0.0",) +_instruments = ("sqlalchemy >= 1.0.0, < 2.1.0",) _supports_metrics = True diff --git a/opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap_gen.py b/opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap_gen.py index 04a596d4e7..2e7b5532f3 100644 --- a/opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap_gen.py +++ b/opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap_gen.py @@ -161,7 +161,7 @@ "instrumentation": "opentelemetry-instrumentation-requests==0.50b0.dev", }, { - "library": "sqlalchemy >= 1.0.0, < 2.0.0", + "library": "sqlalchemy >= 1.0.0, < 2.1.0", "instrumentation": "opentelemetry-instrumentation-sqlalchemy==0.50b0.dev", }, { From 1064b6b1cbc806361a23f058ee5ad02e1d65bcf7 Mon Sep 17 00:00:00 2001 From: emdneto <9735060+emdneto@users.noreply.github.com> Date: Thu, 7 Nov 2024 20:08:28 -0300 Subject: [PATCH 6/6] fix version in requirements.txt Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com> --- .../test-requirements-1.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instrumentation/opentelemetry-instrumentation-sqlalchemy/test-requirements-1.txt b/instrumentation/opentelemetry-instrumentation-sqlalchemy/test-requirements-1.txt index 5ccc30f4b0..885cee8c62 100644 --- a/instrumentation/opentelemetry-instrumentation-sqlalchemy/test-requirements-1.txt +++ b/instrumentation/opentelemetry-instrumentation-sqlalchemy/test-requirements-1.txt @@ -7,7 +7,7 @@ packaging==24.0 pluggy==1.5.0 py-cpuinfo==9.0.0 pytest==7.4.4 -SQLAlchemy==1.4.54 +SQLAlchemy==1.4.51 tomli==2.0.1 typing_extensions==4.12.2 wrapt==1.16.0