Skip to content

Commit

Permalink
Merge branch 'main' into fix-sqlalchemy-engine-from-config-monkeypatc…
Browse files Browse the repository at this point in the history
…hing
  • Loading branch information
shalevr authored Sep 28, 2024
2 parents c446d2e + d52f42f commit 8e0ba23
Show file tree
Hide file tree
Showing 244 changed files with 2,740 additions and 808 deletions.
17 changes: 3 additions & 14 deletions .github/component_owners.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,27 +45,13 @@ components:

instrumentation/opentelemetry-instrumentation-urllib:
- shalevr
- ocelotl

instrumentation/opentelemetry-instrumentation-urllib3:
- shalevr
- ocelotl

instrumentation/opentelemetry-instrumentation-sqlalchemy:
- shalevr

instrumentation/opentelemetry-instrumentation-flask:
- ocelotl

instrumentation/opentelemetry-instrumentation-jinja2:
- ocelotl

instrumentation/opentelemetry-instrumentation-logging:
- ocelotl

instrumentation/opentelemetry-instrumentation-requests:
- ocelotl

instrumentation/opentelemetry-instrumentation-cassandra:
- mattcontinisio

Expand All @@ -75,5 +61,8 @@ components:
instrumentation/opentelemetry-instrumentation-psycopg:
- federicobond

instrumentation/opentelemetry-instrumentation-aiokafka:
- dimastbk

processor/opentelemetry-processor-baggage:
- codeboten
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ jobs:
{%- if job_data == "generate-workflows" %}
if: |
!contains(github.event.pull_request.labels.*.name, 'Skip generate-workflows')
&& github.actor != 'opentelemetrybot'
&& github.actor != 'opentelemetrybot' && github.event_name == 'pull_request'
{%- endif %}
{%- if job_data == "public-symbols-check" %}
if: |
!contains(github.event.pull_request.labels.*.name, 'Approve Public API check')
&& github.actor != 'opentelemetrybot'
&& github.actor != 'opentelemetrybot' && github.event_name == 'pull_request'
{%- endif %}
steps:
- name: Checkout repo @ SHA - ${% raw %}{{ github.sha }}{% endraw %}
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/lint_0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,24 @@ jobs:
- name: Run tests
run: tox -e lint-instrumentation-aio-pika

lint-instrumentation-aiokafka:
name: instrumentation-aiokafka
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

- name: Run tests
run: tox -e lint-instrumentation-aiokafka

lint-instrumentation-kafka-python:
name: instrumentation-kafka-python
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/misc_0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
runs-on: ubuntu-latest
if: |
!contains(github.event.pull_request.labels.*.name, 'Skip generate-workflows')
&& github.actor != 'opentelemetrybot'
&& github.actor != 'opentelemetrybot' && github.event_name == 'pull_request'
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4
Expand Down
108 changes: 108 additions & 0 deletions .github/workflows/test_1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3094,6 +3094,114 @@ jobs:
- name: Run tests
run: tox -e pypy3-test-instrumentation-aio-pika-3 -- -ra

py38-test-instrumentation-aiokafka_ubuntu-latest:
name: instrumentation-aiokafka 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

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

py39-test-instrumentation-aiokafka_ubuntu-latest:
name: instrumentation-aiokafka 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

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

py310-test-instrumentation-aiokafka_ubuntu-latest:
name: instrumentation-aiokafka 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

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

py311-test-instrumentation-aiokafka_ubuntu-latest:
name: instrumentation-aiokafka 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

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

py312-test-instrumentation-aiokafka_ubuntu-latest:
name: instrumentation-aiokafka 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

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

pypy3-test-instrumentation-aiokafka_ubuntu-latest:
name: instrumentation-aiokafka 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

- name: Run tests
run: tox -e pypy3-test-instrumentation-aiokafka -- -ra

py38-test-instrumentation-kafka-python_ubuntu-latest:
name: instrumentation-kafka-python 3.8 Ubuntu
runs-on: ubuntu-latest
Expand Down
37 changes: 32 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,44 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

## Added
### Added

- `opentelemetry-instrumentation-fastapi` Add autoinstrumentation mechanism tests.
([#2860](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2860))
- `opentelemetry-instrumentation-aiokafka` Add instrumentor and auto instrumentation support for aiokafka
([#2082](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2082))


### Fixed

- `opentelemetry-instrumentation-aiokafka` Wrap `AIOKafkaConsumer.getone()` instead of `AIOKafkaConsumer.__anext__`
([#2874](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2874))

## Version 1.27.0/0.48b0 ()

### Added

- `opentelemetry-instrumentation-kafka-python` Instrument temporary fork, kafka-python-ng
inside kafka-python's instrumentation
([#2537](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2537))
- `opentelemetry-instrumentation-asgi`, `opentelemetry-instrumentation-fastapi` Add ability to disable internal HTTP send and receive spans
([#2802](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2802))
- `opentelemetry-instrumentation-asgi` Add fallback decoding for ASGI headers
([#2837](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2837))

## Breaking changes
### Breaking changes

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

## Fixed
### Fixed

- `opentelemetry-instrumentation-httpx` fix handling of async hooks
([#2823](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2823))
- `opentelemetry-instrumentation-system-metrics` fix `process.runtime.cpu.utilization` values to be shown in range of 0 to 1
([2812](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2812))
([#2812](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2812))
- `opentelemetry-instrumentation-fastapi` fix `fastapi` auto-instrumentation by removing `fastapi-slim` support, `fastapi-slim` itself is discontinued from maintainers
([2783](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2783))
([#2783](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2783))
- `opentelemetry-instrumentation-aws-lambda` Avoid exception when a handler is not present.
([#2750](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2750))
- `opentelemetry-instrumentation-django` Fix regression - `http.target` re-added back to old semconv duration metrics
Expand All @@ -42,6 +63,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
([#2563](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2563))
- `opentelemetry-instrumentation-sqlalchemy` Fixes engines from `sqlalchemy.engine_from_config` not being fully instrumented
([#2816](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2816))
- `opentelemetry-instrumentation` fix `http.host` new http semantic convention mapping to depend on `kind` of span
([#2814](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2814))
- `opentelemetry-instrumentation` Fix the description of `http.server.duration` and `http.server.request.duration`
([#2753](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2753))
- `opentelemetry-instrumentation-grpc` Fix grpc supported version
([#2845](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2845))

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

Expand Down
3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ Some of the tox targets install packages from the [OpenTelemetry Python Core Rep
CORE_REPO_SHA=c49ad57bfe35cfc69bfa863d74058ca9bec55fc3 tox
```

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).
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).

## Style Guide

Expand Down Expand Up @@ -275,6 +275,7 @@ Below is a checklist of things to be mindful of when implementing a new instrume
- Isolate sync and async test
- 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.
- ex. <https://github.com/open-telemetry/opentelemetry-python-contrib/blob/60fb936b7e5371b3e5587074906c49fb873cbd76/instrumentation/opentelemetry-instrumentation-grpc/tests/test_aio_server_interceptor.py#L84>
- 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.

## Expectations from contributors

Expand Down
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@
<img alt="license" src="https://img.shields.io/badge/license-Apache_2.0-green.svg?style=for-the-badge">
</a>
<br/>
<a href="https://github.com/open-telemetry/opentelemetry-python-contrib/actions?query=workflow%3ATest+branch%3Amaster">
<img alt="Build Status" src="https://github.com/open-telemetry/opentelemetry-python-contrib/workflows/Test/badge.svg">
<a href="https://github.com/open-telemetry/opentelemetry-python-contrib/actions/workflows/test_0.yml">
<img alt="Build Status 0" src="https://github.com/open-telemetry/opentelemetry-python-contrib/actions/workflows/test_0.yml/badge.svg?branch=main">
</a>
<a href="https://github.com/open-telemetry/opentelemetry-python-contrib/actions/workflows/test_1.yml">
<img alt="Build Status 1" src="https://github.com/open-telemetry/opentelemetry-python-contrib/actions/workflows/test_1.yml/badge.svg?branch=main">
</a>
<img alt="Beta" src="https://img.shields.io/badge/status-beta-informational?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAIRlWElmTU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAA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pMdtWHh0ywsJC/ZGoCb8/9D8F/ifgLLl8S8QWfU8cAAAAASUVORK5CYII=">
</p>
Expand Down Expand Up @@ -70,7 +73,7 @@ pip install opentelemetry-instrumentation-{integration}

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

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

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

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

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

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

Emeritus Maintainers:
Expand Down
2 changes: 1 addition & 1 deletion _template/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "0.48b0.dev"
__version__ = "0.49b0.dev"
1 change: 1 addition & 0 deletions docs-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ django>=2.2
# Required by instrumentation and exporter packages
aio_pika~=7.2.0
aiohttp~=3.0
aiokafka~=0.11.0
aiopg>=0.13.0,<1.3.0
asyncpg>=0.12.0
boto~=2.0
Expand Down
10 changes: 10 additions & 0 deletions docs/instrumentation/aiokafka/aiokafka.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. include:: ../../../instrumentation/opentelemetry-instrumentation-aiokafka/README.rst
:end-before: References

API
---

.. automodule:: opentelemetry.instrumentation.aiokafka
:members:
:undoc-members:
:show-inheritance:
4 changes: 2 additions & 2 deletions eachdist.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ sortfirst=
ext/*

[stable]
version=1.27.0.dev
version=1.28.0.dev

packages=
opentelemetry-sdk
Expand All @@ -34,7 +34,7 @@ packages=
opentelemetry-api

[prerelease]
version=0.48b0.dev
version=0.49b0.dev

packages=
all
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "0.48b0.dev"
__version__ = "0.49b0.dev"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
asgiref==3.7.2
asgiref==3.8.1
certifi==2024.7.4
charset-normalizer==3.3.2
# We can drop this after bumping baseline to pypy-39
Expand All @@ -16,7 +16,7 @@ pytest==7.4.4
python-snappy==0.7.1
requests==2.32.3
tomli==2.0.1
typing_extensions==4.10.0
typing_extensions==4.12.2
urllib3==2.2.2
wrapt==1.16.0
zipp==3.19.2
Expand Down
Loading

0 comments on commit 8e0ba23

Please sign in to comment.