Skip to content

Commit adbde50

Browse files
committed
Merge branch 'main' into antonpirker/run-tests-in-python-313
2 parents d9b3bca + 3deb6b9 commit adbde50

File tree

247 files changed

+2412
-736
lines changed

Some content is hidden

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

247 files changed

+2412
-736
lines changed

.github/component_owners.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -45,27 +45,13 @@ components:
4545

4646
instrumentation/opentelemetry-instrumentation-urllib:
4747
- shalevr
48-
- ocelotl
4948

5049
instrumentation/opentelemetry-instrumentation-urllib3:
5150
- shalevr
52-
- ocelotl
5351

5452
instrumentation/opentelemetry-instrumentation-sqlalchemy:
5553
- shalevr
5654

57-
instrumentation/opentelemetry-instrumentation-flask:
58-
- ocelotl
59-
60-
instrumentation/opentelemetry-instrumentation-jinja2:
61-
- ocelotl
62-
63-
instrumentation/opentelemetry-instrumentation-logging:
64-
- ocelotl
65-
66-
instrumentation/opentelemetry-instrumentation-requests:
67-
- ocelotl
68-
6955
instrumentation/opentelemetry-instrumentation-cassandra:
7056
- mattcontinisio
7157

.github/workflows/generate_workflows_lib/src/generate_workflows_lib/misc.yml.j2

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,12 @@ jobs:
2323
{%- if job_data == "generate-workflows" %}
2424
if: |
2525
!contains(github.event.pull_request.labels.*.name, 'Skip generate-workflows')
26-
&& github.actor != 'opentelemetrybot'
26+
&& github.actor != 'opentelemetrybot' && github.event_name == 'pull_request'
27+
{%- endif %}
28+
{%- if job_data == "public-symbols-check" %}
29+
if: |
30+
!contains(github.event.pull_request.labels.*.name, 'Approve Public API check')
31+
&& github.actor != 'opentelemetrybot' && github.event_name == 'pull_request'
2732
{%- endif %}
2833
steps:
2934
- name: Checkout repo @ SHA - ${% raw %}{{ github.sha }}{% endraw %}

.github/workflows/lint_0.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -970,6 +970,24 @@ jobs:
970970
- name: Run tests
971971
run: tox -e lint-instrumentation-aio-pika
972972

973+
lint-instrumentation-aiokafka:
974+
name: instrumentation-aiokafka
975+
runs-on: ubuntu-latest
976+
steps:
977+
- name: Checkout repo @ SHA - ${{ github.sha }}
978+
uses: actions/checkout@v4
979+
980+
- name: Set up Python 3.12
981+
uses: actions/setup-python@v5
982+
with:
983+
python-version: "3.12"
984+
985+
- name: Install tox
986+
run: pip install tox
987+
988+
- name: Run tests
989+
run: tox -e lint-instrumentation-aiokafka
990+
973991
lint-instrumentation-kafka-python:
974992
name: instrumentation-kafka-python
975993
runs-on: ubuntu-latest

.github/workflows/misc_0.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ jobs:
9696
runs-on: ubuntu-latest
9797
if: |
9898
!contains(github.event.pull_request.labels.*.name, 'Skip generate-workflows')
99-
&& github.actor != 'opentelemetrybot'
99+
&& github.actor != 'opentelemetrybot' && github.event_name == 'pull_request'
100100
steps:
101101
- name: Checkout repo @ SHA - ${{ github.sha }}
102102
uses: actions/checkout@v4

.github/workflows/test_1.yml

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4109,6 +4109,114 @@ jobs:
41094109
- name: Run tests
41104110
run: tox -e pypy3-test-instrumentation-aio-pika-3 -- -ra
41114111

4112+
py38-test-instrumentation-aiokafka_ubuntu-latest:
4113+
name: instrumentation-aiokafka 3.8 Ubuntu
4114+
runs-on: ubuntu-latest
4115+
steps:
4116+
- name: Checkout repo @ SHA - ${{ github.sha }}
4117+
uses: actions/checkout@v4
4118+
4119+
- name: Set up Python 3.8
4120+
uses: actions/setup-python@v5
4121+
with:
4122+
python-version: "3.8"
4123+
4124+
- name: Install tox
4125+
run: pip install tox
4126+
4127+
- name: Run tests
4128+
run: tox -e py38-test-instrumentation-aiokafka -- -ra
4129+
4130+
py39-test-instrumentation-aiokafka_ubuntu-latest:
4131+
name: instrumentation-aiokafka 3.9 Ubuntu
4132+
runs-on: ubuntu-latest
4133+
steps:
4134+
- name: Checkout repo @ SHA - ${{ github.sha }}
4135+
uses: actions/checkout@v4
4136+
4137+
- name: Set up Python 3.9
4138+
uses: actions/setup-python@v5
4139+
with:
4140+
python-version: "3.9"
4141+
4142+
- name: Install tox
4143+
run: pip install tox
4144+
4145+
- name: Run tests
4146+
run: tox -e py39-test-instrumentation-aiokafka -- -ra
4147+
4148+
py310-test-instrumentation-aiokafka_ubuntu-latest:
4149+
name: instrumentation-aiokafka 3.10 Ubuntu
4150+
runs-on: ubuntu-latest
4151+
steps:
4152+
- name: Checkout repo @ SHA - ${{ github.sha }}
4153+
uses: actions/checkout@v4
4154+
4155+
- name: Set up Python 3.10
4156+
uses: actions/setup-python@v5
4157+
with:
4158+
python-version: "3.10"
4159+
4160+
- name: Install tox
4161+
run: pip install tox
4162+
4163+
- name: Run tests
4164+
run: tox -e py310-test-instrumentation-aiokafka -- -ra
4165+
4166+
py311-test-instrumentation-aiokafka_ubuntu-latest:
4167+
name: instrumentation-aiokafka 3.11 Ubuntu
4168+
runs-on: ubuntu-latest
4169+
steps:
4170+
- name: Checkout repo @ SHA - ${{ github.sha }}
4171+
uses: actions/checkout@v4
4172+
4173+
- name: Set up Python 3.11
4174+
uses: actions/setup-python@v5
4175+
with:
4176+
python-version: "3.11"
4177+
4178+
- name: Install tox
4179+
run: pip install tox
4180+
4181+
- name: Run tests
4182+
run: tox -e py311-test-instrumentation-aiokafka -- -ra
4183+
4184+
py312-test-instrumentation-aiokafka_ubuntu-latest:
4185+
name: instrumentation-aiokafka 3.12 Ubuntu
4186+
runs-on: ubuntu-latest
4187+
steps:
4188+
- name: Checkout repo @ SHA - ${{ github.sha }}
4189+
uses: actions/checkout@v4
4190+
4191+
- name: Set up Python 3.12
4192+
uses: actions/setup-python@v5
4193+
with:
4194+
python-version: "3.12"
4195+
4196+
- name: Install tox
4197+
run: pip install tox
4198+
4199+
- name: Run tests
4200+
run: tox -e py312-test-instrumentation-aiokafka -- -ra
4201+
4202+
pypy3-test-instrumentation-aiokafka_ubuntu-latest:
4203+
name: instrumentation-aiokafka pypy-3.8 Ubuntu
4204+
runs-on: ubuntu-latest
4205+
steps:
4206+
- name: Checkout repo @ SHA - ${{ github.sha }}
4207+
uses: actions/checkout@v4
4208+
4209+
- name: Set up Python pypy-3.8
4210+
uses: actions/setup-python@v5
4211+
with:
4212+
python-version: "pypy-3.8"
4213+
4214+
- name: Install tox
4215+
run: pip install tox
4216+
4217+
- name: Run tests
4218+
run: tox -e pypy3-test-instrumentation-aiokafka -- -ra
4219+
41124220
py38-test-instrumentation-kafka-python_ubuntu-latest:
41134221
name: instrumentation-kafka-python 3.8 Ubuntu
41144222
runs-on: ubuntu-latest

CHANGELOG.md

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

88
## Unreleased
99

10-
## Added
10+
### Added
11+
12+
- `opentelemetry-instrumentation-fastapi` Add autoinstrumentation mechanism tests.
13+
([#2860](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2860))
14+
- `opentelemetry-instrumentation-aiokafka` Add instrumentor and auto instrumentation support for aiokafka
15+
([#2082](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2082))
16+
17+
## Version 1.27.0/0.48b0 ()
18+
19+
### Added
1120

1221
- `opentelemetry-instrumentation-kafka-python` Instrument temporary fork, kafka-python-ng
1322
inside kafka-python's instrumentation
1423
([#2537](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2537))
24+
- `opentelemetry-instrumentation-asgi`, `opentelemetry-instrumentation-fastapi` Add ability to disable internal HTTP send and receive spans
25+
([#2802](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2802))
1526

16-
## Breaking changes
27+
### Breaking changes
1728

1829
- `opentelemetry-bootstrap` Remove `opentelemetry-instrumentation-aws-lambda` from the defaults instrumentations
1930
([#2786](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2786))
2031

21-
## Fixed
32+
### Fixed
2233

2334
- Add Python 3.13 support
2435
([#2724](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2724))
36+
- `opentelemetry-instrumentation-httpx` fix handling of async hooks
37+
([#2823](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2823))
38+
- `opentelemetry-instrumentation-system-metrics` fix `process.runtime.cpu.utilization` values to be shown in range of 0 to 1
39+
([#2812](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2812))
2540
- `opentelemetry-instrumentation-fastapi` fix `fastapi` auto-instrumentation by removing `fastapi-slim` support, `fastapi-slim` itself is discontinued from maintainers
26-
([2783](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2783))
41+
([#2783](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2783))
2742
- `opentelemetry-instrumentation-aws-lambda` Avoid exception when a handler is not present.
2843
([#2750](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2750))
2944
- `opentelemetry-instrumentation-django` Fix regression - `http.target` re-added back to old semconv duration metrics
@@ -38,6 +53,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3853
([#2385](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2385))
3954
- `opentelemetry-instrumentation-asyncio` Fixes async generator coroutines not being awaited
4055
([#2792](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2792))
56+
- `opentelemetry-instrumentation-tornado` Handle http client exception and record exception info into span
57+
([#2563](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2563))
58+
- `opentelemetry-instrumentation` fix `http.host` new http semantic convention mapping to depend on `kind` of span
59+
([#2814](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2814))
60+
- `opentelemetry-instrumentation` Fix the description of `http.server.duration` and `http.server.request.duration`
61+
([#2753](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2753))
62+
- `opentelemetry-instrumentation-grpc` Fix grpc supported version
63+
([#2845](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2845))
4164

4265
## Version 1.26.0/0.47b0 (2024-07-23)
4366

CONTRIBUTING.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ and [**Maintainer**](https://github.com/open-telemetry/community/blob/main/commu
1515

1616
Before you can contribute, you will need to sign the [Contributor License Agreement](https://docs.linuxfoundation.org/lfx/easycla/contributors).
1717

18-
Please also read the [OpenTelemetry Contributor Guide](https://github.com/open-telemetry/community/blob/main/CONTRIBUTING.md).
18+
Please also read the [OpenTelemetry Contributor Guide](https://github.com/open-telemetry/community/blob/main/guides/contributor/README.md).
1919

2020
## Index
2121

@@ -235,7 +235,7 @@ Some of the tox targets install packages from the [OpenTelemetry Python Core Rep
235235
CORE_REPO_SHA=c49ad57bfe35cfc69bfa863d74058ca9bec55fc3 tox
236236
```
237237

238-
The continuous integration overrides that environment variable with as per the configuration [here](https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/.github/workflows/test.yml#L9).
238+
The continuous integration overrides that environment variable with as per the configuration [here](https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/.github/workflows/test_0.yml#L14).
239239

240240
## Style Guide
241241

@@ -275,6 +275,7 @@ Below is a checklist of things to be mindful of when implementing a new instrume
275275
- Isolate sync and async test
276276
- For synchronous tests, the typical test case class is inherited from `opentelemetry.test.test_base.TestBase`. However, if you want to write asynchronous tests, the test case class should inherit also from `IsolatedAsyncioTestCase`. Adding asynchronous tests to a common test class can lead to tests passing without actually running, which can be misleading.
277277
- ex. <https://github.com/open-telemetry/opentelemetry-python-contrib/blob/60fb936b7e5371b3e5587074906c49fb873cbd76/instrumentation/opentelemetry-instrumentation-grpc/tests/test_aio_server_interceptor.py#L84>
278+
- All instrumentations have the same version. If you are going to develop a new instrumentation it would probably have `X.Y.dev` version and depends on `opentelemetry-instrumentation` and `opentelemetry-semantic-conventions` for the same version. That means that if you want to install your instrumentation you need to install its dependencies from this repo and the core repo also from git.
278279

279280
## Expectations from contributors
280281

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,11 @@
2020
<img alt="license" src="https://img.shields.io/badge/license-Apache_2.0-green.svg?style=for-the-badge">
2121
</a>
2222
<br/>
23-
<a href="https://github.com/open-telemetry/opentelemetry-python-contrib/actions?query=workflow%3ATest+branch%3Amaster">
24-
<img alt="Build Status" src="https://github.com/open-telemetry/opentelemetry-python-contrib/workflows/Test/badge.svg">
23+
<a href="https://github.com/open-telemetry/opentelemetry-python-contrib/actions/workflows/test_0.yml">
24+
<img alt="Build Status 0" src="https://github.com/open-telemetry/opentelemetry-python-contrib/actions/workflows/test_0.yml/badge.svg?branch=main">
25+
</a>
26+
<a href="https://github.com/open-telemetry/opentelemetry-python-contrib/actions/workflows/test_1.yml">
27+
<img alt="Build Status 1" src="https://github.com/open-telemetry/opentelemetry-python-contrib/actions/workflows/test_1.yml/badge.svg?branch=main">
2528
</a>
2629
<img alt="Beta" src="https://img.shields.io/badge/status-beta-informational?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAIRlWElmTU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAACQAAAAAQAAAJAAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAABigAwAEAAAAAQAAABgAAAAA8A2UOAAAAAlwSFlzAAAWJQAAFiUBSVIk8AAAAVlpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdG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dZ2f+Idbm1rlNY8esFffBit9HtK5/MejsrJVxikOXlb1Ukir2X+Rbdkd1KG2Ixfn2Ql4JRmELnYK9mEM8G36fAA3xEQ89fxXihC8q+sAKi9jhHxNqagY2hiaYgRCm0f0QP7H4Fp11LSXiuBY2aYFlh0DeDIVVFUJQn5rCnpiNI2gvLxHnASn9DIVHJJlm5rXvQAGEo4zvKq2w5G1NxENN7jrft1oxMdekETjxdH2Z3x+VTVYsPb+O0C/9/auN6v2hNZw5b2UOmSbG5/rkC3LBA+1PdxFxORjxpQ81GcxKc+ybVjEBvUJvaGJ7p7n5A5KSwe4AzkasA+crmzFtowoIVTiLjANm8GDsrWW35ScI3JY8Urv83tnkF8JR0yLvEt2hO/0qNyy3Jb3YKeHeHeLeOuVLRpNF+pkf85OW7/zJxWdXsbsKBUk2TC0BCPwMq5Q/CPvaJFkNS/1l1qUPe+uH3oD59erYGI/Y4sce6KaXYElAIOLt+0O3t2+/xJDF1XvOlWGC1W1B8VMszbGfOvT5qaRRAIFK3BCO164nZ0uYLH2YjNN8thXS2v2BK9gTfD7jHVxzHr4roOlEvYYz9QIz+Vl/sLDXInsctFsXjqIRnO2ZO387lxmIboLDZCJ59KLFliNIgh9ipt6tLg9SihpRPDO1ia5byw7de1aCQmF5geOQtK509rzfdwxaKOIq+73AvwCC5/5fcV4vo3+3LpMdtWHh0ywsJC/ZGoCb8/9D8F/ifgLLl8S8QWfU8cAAAAASUVORK5CYII=">
2730
</p>
@@ -70,7 +73,7 @@ pip install opentelemetry-instrumentation-{integration}
7073

7174
To install the development versions of these packages instead, clone or fork
7275
this repo and do an [editable
73-
install](https://pip.pypa.io/en/stable/reference/pip_install/#editable-installs):
76+
install](https://pip.pypa.io/en/stable/topics/local-project-installs/#editable-installs):
7477

7578
```sh
7679
pip install -e ./instrumentation/opentelemetry-instrumentation-{integration}
@@ -109,12 +112,10 @@ Meeting notes are available as a public [Google doc](https://docs.google.com/doc
109112

110113
Approvers ([@open-telemetry/python-approvers](https://github.com/orgs/open-telemetry/teams/python-approvers)):
111114

112-
- [Aaron Abbott](https://github.com/aabmass), Google
113115
- [Emídio Neto](https://github.com/emdneto), Zenvia
114116
- [Jeremy Voss](https://github.com/jeremydvoss), Microsoft
115117
- [Owais Lone](https://github.com/owais), Splunk
116118
- [Pablo Collins](https://github.com/pmcollins), Splunk
117-
- [Riccardo Magliocchetti](https://github.com/xrmx), Elastic
118119
- [Sanket Mehta](https://github.com/sanketmehta28), Cisco
119120
- [Srikanth Chekuri](https://github.com/srikanthccv), signoz.io
120121
- [Tammy Baylis](https://github.com/tammy-baylis-swi), SolarWinds
@@ -131,8 +132,10 @@ Emeritus Approvers:
131132

132133
Maintainers ([@open-telemetry/python-maintainers](https://github.com/orgs/open-telemetry/teams/python-maintainers)):
133134

135+
- [Aaron Abbott](https://github.com/aabmass), Google
134136
- [Diego Hurtado](https://github.com/ocelotl), Lightstep
135137
- [Leighton Chen](https://github.com/lzchen), Microsoft
138+
- [Riccardo Magliocchetti](https://github.com/xrmx), Elastic
136139
- [Shalev Roda](https://github.com/shalevr), Cisco
137140

138141
Emeritus Maintainers:

_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.48b0.dev"
15+
__version__ = "0.49b0.dev"

docs-requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ django>=2.2
2020
# Required by instrumentation and exporter packages
2121
aio_pika~=7.2.0
2222
aiohttp~=3.0
23+
aiokafka~=0.11.0
2324
aiopg>=0.13.0,<1.3.0
2425
asyncpg>=0.12.0
2526
boto~=2.0

0 commit comments

Comments
 (0)