Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

psycopg2-binary support #3186

Merged
merged 19 commits into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/core_contrib_test_0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1075,6 +1075,28 @@ jobs:
- name: Run tests
run: tox -e py38-test-instrumentation-psycopg2 -- -ra

py38-test-instrumentation-psycopg2-binary:
name: instrumentation-psycopg2-binary
runs-on: ubuntu-latest
steps:
- name: Checkout contrib repo @ SHA - ${{ env.CONTRIB_REPO_SHA }}
uses: actions/checkout@v4
with:
repository: open-telemetry/opentelemetry-python-contrib
ref: ${{ env.CONTRIB_REPO_SHA }}

- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: "3.8"
architecture: "x64"

- name: Install tox
run: pip install tox-uv

- name: Run tests
run: tox -e py38-test-instrumentation-psycopg2-binary -- -ra

py38-test-instrumentation-psycopg:
name: instrumentation-psycopg
runs-on: ubuntu-latest
Expand Down
216 changes: 108 additions & 108 deletions .github/workflows/test_1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1222,6 +1222,114 @@ jobs:
- name: Run tests
run: tox -e py313-test-instrumentation-psycopg2 -- -ra

py38-test-instrumentation-psycopg2-binary_ubuntu-latest:
name: instrumentation-psycopg2-binary 3.8 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: "3.8"

- name: Install tox
run: pip install tox-uv

- name: Run tests
run: tox -e py38-test-instrumentation-psycopg2-binary -- -ra

py39-test-instrumentation-psycopg2-binary_ubuntu-latest:
name: instrumentation-psycopg2-binary 3.9 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: "3.9"

- name: Install tox
run: pip install tox-uv

- name: Run tests
run: tox -e py39-test-instrumentation-psycopg2-binary -- -ra

py310-test-instrumentation-psycopg2-binary_ubuntu-latest:
name: instrumentation-psycopg2-binary 3.10 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install tox
run: pip install tox-uv

- name: Run tests
run: tox -e py310-test-instrumentation-psycopg2-binary -- -ra

py311-test-instrumentation-psycopg2-binary_ubuntu-latest:
name: instrumentation-psycopg2-binary 3.11 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install tox
run: pip install tox-uv

- name: Run tests
run: tox -e py311-test-instrumentation-psycopg2-binary -- -ra

py312-test-instrumentation-psycopg2-binary_ubuntu-latest:
name: instrumentation-psycopg2-binary 3.12 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install tox
run: pip install tox-uv

- name: Run tests
run: tox -e py312-test-instrumentation-psycopg2-binary -- -ra

py313-test-instrumentation-psycopg2-binary_ubuntu-latest:
name: instrumentation-psycopg2-binary 3.13 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: "3.13"

- name: Install tox
run: pip install tox-uv

- name: Run tests
run: tox -e py313-test-instrumentation-psycopg2-binary -- -ra

py38-test-instrumentation-psycopg_ubuntu-latest:
name: instrumentation-psycopg 3.8 Ubuntu
runs-on: ubuntu-latest
Expand Down Expand Up @@ -4407,111 +4515,3 @@ jobs:

- name: Run tests
run: tox -e py38-test-util-http -- -ra

py39-test-util-http_ubuntu-latest:
name: util-http 3.9 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: "3.9"

- name: Install tox
run: pip install tox-uv

- name: Run tests
run: tox -e py39-test-util-http -- -ra

py310-test-util-http_ubuntu-latest:
name: util-http 3.10 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install tox
run: pip install tox-uv

- name: Run tests
run: tox -e py310-test-util-http -- -ra

py311-test-util-http_ubuntu-latest:
name: util-http 3.11 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install tox
run: pip install tox-uv

- name: Run tests
run: tox -e py311-test-util-http -- -ra

py312-test-util-http_ubuntu-latest:
name: util-http 3.12 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install tox
run: pip install tox-uv

- name: Run tests
run: tox -e py312-test-util-http -- -ra

py313-test-util-http_ubuntu-latest:
name: util-http 3.13 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: "3.13"

- name: Install tox
run: pip install tox-uv

- name: Run tests
run: tox -e py313-test-util-http -- -ra

pypy3-test-util-http_ubuntu-latest:
name: util-http pypy-3.8 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python pypy-3.8
uses: actions/setup-python@v5
with:
python-version: "pypy-3.8"

- name: Install tox
run: pip install tox-uv

- name: Run tests
run: tox -e pypy3-test-util-http -- -ra
108 changes: 108 additions & 0 deletions .github/workflows/test_2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,114 @@ env:

jobs:

py39-test-util-http_ubuntu-latest:
name: util-http 3.9 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: "3.9"

- name: Install tox
run: pip install tox-uv

- name: Run tests
run: tox -e py39-test-util-http -- -ra

py310-test-util-http_ubuntu-latest:
name: util-http 3.10 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install tox
run: pip install tox-uv

- name: Run tests
run: tox -e py310-test-util-http -- -ra

py311-test-util-http_ubuntu-latest:
name: util-http 3.11 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install tox
run: pip install tox-uv

- name: Run tests
run: tox -e py311-test-util-http -- -ra

py312-test-util-http_ubuntu-latest:
name: util-http 3.12 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install tox
run: pip install tox-uv

- name: Run tests
run: tox -e py312-test-util-http -- -ra

py313-test-util-http_ubuntu-latest:
name: util-http 3.13 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: "3.13"

- name: Install tox
run: pip install tox-uv

- name: Run tests
run: tox -e py313-test-util-http -- -ra

pypy3-test-util-http_ubuntu-latest:
name: util-http pypy-3.8 Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4

- name: Set up Python pypy-3.8
uses: actions/setup-python@v5
with:
python-version: "pypy-3.8"

- name: Install tox
run: pip install tox-uv

- name: Run tests
run: tox -e pypy3-test-util-http -- -ra

py38-test-propagator-aws-xray-0_ubuntu-latest:
name: propagator-aws-xray-0 3.8 Ubuntu
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
([#3129](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3129))
- `opentelemetry-util-http` Add `py.typed` file to enable PEP 561
([#3127](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3127))
- `opentelemetry-instrumentation-psycopg2` Add support for psycopg2-binary
([#3186](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3186))
- `opentelemetry-opentelemetry-botocore` Add basic support for GenAI attributes for AWS Bedrock Converse API
([#3161](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3161))

Expand Down
2 changes: 1 addition & 1 deletion instrumentation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
| [opentelemetry-instrumentation-mysqlclient](./opentelemetry-instrumentation-mysqlclient) | mysqlclient < 3 | No | experimental
| [opentelemetry-instrumentation-pika](./opentelemetry-instrumentation-pika) | pika >= 0.12.0 | No | experimental
| [opentelemetry-instrumentation-psycopg](./opentelemetry-instrumentation-psycopg) | psycopg >= 3.1.0 | No | experimental
| [opentelemetry-instrumentation-psycopg2](./opentelemetry-instrumentation-psycopg2) | psycopg2 >= 2.7.3.1 | No | experimental
| [opentelemetry-instrumentation-psycopg2](./opentelemetry-instrumentation-psycopg2) | psycopg2 >= 2.7.3.1,psycopg2-binary >= 2.7.3.1 | No | experimental
| [opentelemetry-instrumentation-pymemcache](./opentelemetry-instrumentation-pymemcache) | pymemcache >= 1.3.5, < 5 | No | experimental
| [opentelemetry-instrumentation-pymongo](./opentelemetry-instrumentation-pymongo) | pymongo >= 3.1, < 5.0 | No | experimental
| [opentelemetry-instrumentation-pymysql](./opentelemetry-instrumentation-pymysql) | PyMySQL < 2 | No | experimental
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ dependencies = [
[project.optional-dependencies]
instruments = [
"psycopg2 >= 2.7.3.1",
"psycopg2-binary >= 2.7.3.1",
xrmx marked this conversation as resolved.
Show resolved Hide resolved
]

[project.entry-points.opentelemetry_instrumentor]
Expand Down
Loading
Loading