Skip to content

Commit 87d7ddc

Browse files
authored
Merge branch 'main' into patch-1
2 parents 60247ea + 565e78d commit 87d7ddc

File tree

163 files changed

+3352
-560
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

163 files changed

+3352
-560
lines changed

.github/component_owners.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,9 @@ components:
6767

6868
instrumentation/opentelemetry-instrumentation-cassandra:
6969
- mattcontinisio
70+
71+
instrumentation/opentelemetry-instrumentation-asyncio:
72+
- bourbonkk
73+
74+
instrumentation/opentelemetry-instrumentation-psycopg:
75+
- federicobond

.github/workflows/instrumentations_0.yml

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- 'release/*'
77
pull_request:
88
env:
9-
CORE_REPO_SHA: 84c0e4f38d4fcdb8c13fd3988469fbb8cda28150
9+
CORE_REPO_SHA: a1253585f66d63e7c05a19f070f3bfe0ab6460c1
1010

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

.github/workflows/instrumentations_1.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- 'release/*'
77
pull_request:
88
env:
9-
CORE_REPO_SHA: 84c0e4f38d4fcdb8c13fd3988469fbb8cda28150
9+
CORE_REPO_SHA: a1253585f66d63e7c05a19f070f3bfe0ab6460c1
1010

1111
jobs:
1212
instrumentations-1:
@@ -29,12 +29,18 @@ jobs:
2929
- "wsgi"
3030
- "distro"
3131
- "richconsole"
32+
- "psycopg"
3233
- "prometheus-remote-write"
3334
- "sdkextension-aws"
3435
- "propagator-aws-xray"
3536
- "propagator-ot-trace"
3637
- "resource-detector-container"
3738
os: [ubuntu-20.04]
39+
exclude:
40+
- python-version: py311
41+
package: "prometheus-remote-write"
42+
- python-version: pypy3
43+
package: "prometheus-remote-write"
3844
steps:
3945
- name: Checkout Contrib Repo @ SHA - ${{ github.sha }}
4046
uses: actions/checkout@v2
@@ -43,7 +49,7 @@ jobs:
4349
with:
4450
python-version: ${{ env[matrix.python-version] }}
4551
- name: Install tox
46-
run: pip install tox==3.27.1 tox-factor
52+
run: pip install tox
4753
- name: Cache tox environment
4854
# Preserves .tox directory between runs for faster installs
4955
uses: actions/cache@v1

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

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

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

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

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

.github/workflows/release.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,6 @@ jobs:
4545
4646
echo "PRIOR_VERSION_WHEN_PATCH=$prior_version_when_patch" >> $GITHUB_ENV
4747
48-
# check out main branch to verify there won't be problems with merging the change log
49-
# at the end of this workflow
50-
- uses: actions/checkout@v3
51-
with:
52-
ref: main
53-
5448
- run: |
5549
if [[ -z $PRIOR_VERSION_WHEN_PATCH ]]; then
5650
# not making a patch release
@@ -60,6 +54,12 @@ jobs:
6054
fi
6155
fi
6256
57+
# check out main branch to verify there won't be problems with merging the change log
58+
# at the end of this workflow
59+
- uses: actions/checkout@v3
60+
with:
61+
ref: main
62+
6363
# back to the release branch
6464
- uses: actions/checkout@v3
6565

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- 'release/*'
77
pull_request:
88
env:
9-
CORE_REPO_SHA: 84c0e4f38d4fcdb8c13fd3988469fbb8cda28150
9+
CORE_REPO_SHA: a1253585f66d63e7c05a19f070f3bfe0ab6460c1
1010

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

CHANGELOG.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## Unreleased
99

10-
- Drop uspport for 3.7
10+
### Fixed
11+
- Align gRPC span status codes to OTEL specification ([#1756](https://github.com/open-telemetry/opentelemetry-python-contrib/issues/1756))
12+
13+
## Version 1.23.0/0.44b0 (2024-02-23)
14+
15+
- Drop support for 3.7
1116
([#2151](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2151))
1217
- `opentelemetry-resource-detector-azure` Added 10s timeout to VM Resource Detector
1318
([#2119](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2119))
@@ -17,11 +22,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1722
([#2132](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2132))
1823
- `opentelemetry-resource-detector-azure` Changed timeout to 4 seconds due to [timeout bug](https://github.com/open-telemetry/opentelemetry-python/issues/3644)
1924
([#2136](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2136))
25+
- `opentelemetry-resource-detector-azure` Suppress instrumentation for `urllib` call
26+
([#2178](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2178))
27+
- AwsLambdaInstrumentor handles and re-raises function exception ([#2245](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2245))
28+
29+
### Added
30+
31+
- `opentelemetry-instrumentation-psycopg` Initial release for psycopg 3.x
2032

2133
## Version 1.22.0/0.43b0 (2023-12-14)
2234

2335
### Added
24-
36+
- `opentelemetry-instrumentation-asyncio` Add support for asyncio
37+
([#1919](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1943))
2538
- `opentelemetry-instrumentation` Added Otel semantic convention opt-in mechanism
2639
([#1987](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1987))
2740
- `opentelemetry-instrumentation-httpx` Fix mixing async and non async hooks
@@ -1441,3 +1454,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
14411454

14421455
- `opentelemetry-ext-wsgi` Initial release
14431456
- `opentelemetry-ext-http-requests` Initial release
1457+
1458+
- Drop support for 3.7
1459+
([#2151](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2151))
1460+
- `opentelemetry-resource-detector-azure` Added 10s timeout to VM Resource Detector
1461+
([#2119](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2119))
1462+
- `opentelemetry-instrumentation-asyncpg` Allow AsyncPGInstrumentor to be instantiated multiple times
1463+
([#1791](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1791))
1464+
- `opentelemetry-instrumentation-confluent-kafka` Add support for higher versions until 2.3.0 of confluent_kafka
1465+
([#2132](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2132))
1466+
- `opentelemetry-resource-detector-azure` Changed timeout to 4 seconds due to [timeout bug](https://github.com/open-telemetry/opentelemetry-python/issues/3644)
1467+
([#2136](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2136))
1468+
- `opentelemetry-resource-detector-azure` Suppress instrumentation for `urllib` call
1469+
([#2178](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2178))
1470+
- AwsLambdaInstrumentor handles and re-raises function exception ([#2245](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2245))
1471+

CONTRIBUTING.md

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

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

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

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

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

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

183183
### Testing against a different Core repo branch/commit
@@ -202,7 +202,7 @@ The continuation integration overrides that environment variable with as per the
202202
Below is a checklist of things to be mindful of when implementing a new instrumentation or working on a specific instrumentation. It is one of our goals as a community to keep the implementation specific details of instrumentations as similar across the board as possible for ease of testing and feature parity. It is also good to abstract as much common functionality as possible.
203203

204204
- Follow semantic conventions
205-
- The instrumentation should follow the semantic conventions defined [here](https://github.com/open-telemetry/opentelemetry-specification/tree/main/semantic_conventions)
205+
- The instrumentation should follow the semantic conventions defined [here](https://github.com/open-telemetry/opentelemetry-specification/tree/main/specification/semantic-conventions.md)
206206
- Extends from [BaseInstrumentor](https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/opentelemetry-instrumentation/src/opentelemetry/instrumentation/instrumentor.py#L26)
207207
- Supports auto-instrumentation
208208
- Add an entry point (ex. https://github.com/open-telemetry/opentelemetry-python-contrib/blob/f045c43affff6ff1af8fa2f7514a4fdaca97dacf/instrumentation/opentelemetry-instrumentation-requests/pyproject.toml#L44)

README.md

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

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

RELEASING.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77
* If making a pre-release of stable components (e.g. release candidate),
88
enter the pre-release version number, e.g. `1.9.0rc2`.
99
(otherwise the workflow will pick up the version from `main` and just remove the `.dev` suffix).
10-
* Review and merge the two pull requests that it creates
10+
* Review the two pull requests that it creates.
1111
(one is targeted to the release branch and one is targeted to `main`).
12+
* Merge the one targeted towards the release branch.
13+
* The builds will fail for the `main` pr because of validation rules. Follow the [release workflow](https://github.com/open-telemetry/opentelemetry-python/blob/main/RELEASING.md) for the core repo up until this same point. Change the SHAs of each PR to point at each other to get the `main` builds to pass.
1214

1315
## Preparing a new patch release
1416

_template/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
__version__ = "0.44b0.dev"
15+
__version__ = "0.45b0.dev"

docs-requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ kafka-python>=2.0,<3.0
3636
mysql-connector-python~=8.0
3737
mysqlclient~=2.1.1
3838
psutil>=5
39+
psycopg~=3.1.17
3940
pika>=0.12.0
4041
pymongo~=3.1
4142
PyMySQL~=0.9.3
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
OpenTelemetry asyncio Instrumentation
2+
==============================================
3+
4+
.. automodule:: opentelemetry.instrumentation.asyncio
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
OpenTelemetry Psycopg Instrumentation
2+
=====================================
3+
4+
.. automodule:: opentelemetry.instrumentation.psycopg
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:

docs/instrumentation/psycopg2/psycopg2.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
OpenTelemetry Psycopg Instrumentation
2-
=====================================
1+
OpenTelemetry Psycopg2 Instrumentation
2+
======================================
33

44
.. automodule:: opentelemetry.instrumentation.psycopg2
55
:members:

eachdist.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ sortfirst=
1616
ext/*
1717

1818
[stable]
19-
version=1.23.0.dev
19+
version=1.24.0.dev
2020

2121
packages=
2222
opentelemetry-sdk
@@ -34,7 +34,7 @@ packages=
3434
opentelemetry-api
3535

3636
[prerelease]
37-
version=0.44b0.dev
37+
version=0.45b0.dev
3838

3939
packages=
4040
all

exporter/opentelemetry-exporter-prometheus-remote-write/src/opentelemetry/exporter/prometheus_remote_write/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
__version__ = "0.44b0.dev"
15+
__version__ = "0.45b0.dev"

exporter/opentelemetry-exporter-richconsole/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ classifiers = [
2626
dependencies = [
2727
"opentelemetry-api ~= 1.12",
2828
"opentelemetry-sdk ~= 1.12",
29-
"opentelemetry-semantic-conventions == 0.44b0.dev",
29+
"opentelemetry-semantic-conventions == 0.45b0.dev",
3030
"rich>=10.0.0",
3131
]
3232

exporter/opentelemetry-exporter-richconsole/src/opentelemetry/exporter/richconsole/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
__version__ = "0.44b0.dev"
15+
__version__ = "0.45b0.dev"

instrumentation/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
| [opentelemetry-instrumentation-aiohttp-server](./opentelemetry-instrumentation-aiohttp-server) | aiohttp ~= 3.0 | No
77
| [opentelemetry-instrumentation-aiopg](./opentelemetry-instrumentation-aiopg) | aiopg >= 0.13.0, < 2.0.0 | No
88
| [opentelemetry-instrumentation-asgi](./opentelemetry-instrumentation-asgi) | asgiref ~= 3.0 | No
9+
| [opentelemetry-instrumentation-asyncio](./opentelemetry-instrumentation-asyncio) | asyncio | No
910
| [opentelemetry-instrumentation-asyncpg](./opentelemetry-instrumentation-asyncpg) | asyncpg >= 0.12.0 | No
1011
| [opentelemetry-instrumentation-aws-lambda](./opentelemetry-instrumentation-aws-lambda) | aws_lambda | No
1112
| [opentelemetry-instrumentation-boto](./opentelemetry-instrumentation-boto) | boto~=2.0 | No
@@ -28,6 +29,7 @@
2829
| [opentelemetry-instrumentation-mysql](./opentelemetry-instrumentation-mysql) | mysql-connector-python ~= 8.0 | No
2930
| [opentelemetry-instrumentation-mysqlclient](./opentelemetry-instrumentation-mysqlclient) | mysqlclient < 3 | No
3031
| [opentelemetry-instrumentation-pika](./opentelemetry-instrumentation-pika) | pika >= 0.12.0 | No
32+
| [opentelemetry-instrumentation-psycopg](./opentelemetry-instrumentation-psycopg) | psycopg >= 3.1.0 | No
3133
| [opentelemetry-instrumentation-psycopg2](./opentelemetry-instrumentation-psycopg2) | psycopg2 >= 2.7.3.1 | No
3234
| [opentelemetry-instrumentation-pymemcache](./opentelemetry-instrumentation-pymemcache) | pymemcache >= 1.3.5, < 5 | No
3335
| [opentelemetry-instrumentation-pymongo](./opentelemetry-instrumentation-pymongo) | pymongo >= 3.1, < 5.0 | No

instrumentation/opentelemetry-instrumentation-aio-pika/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ Installation
1818
References
1919
----------
2020

21-
* `OpenTelemetry Aio-pika instrumentation <https://opentelemetry-python-contrib.readthedocs.io/en/latest/instrumentation/aio-pika/aio-pika.html>`_
21+
* `OpenTelemetry Aio-pika instrumentation <https://opentelemetry-python-contrib.readthedocs.io/en/latest/instrumentation/aio_pika/aio_pika.html>`_
2222
* `OpenTelemetry Project <https://opentelemetry.io/>`_
2323
* `OpenTelemetry Python Examples <https://github.com/open-telemetry/opentelemetry-python/tree/main/docs/examples>`_

0 commit comments

Comments
 (0)