Skip to content

Commit

Permalink
Merge branch 'main' of github.com:open-telemetry/opentelemetry-python…
Browse files Browse the repository at this point in the history
…-contrib into coralogix-python-dev-merge
  • Loading branch information
povilasv committed Sep 26, 2023
2 parents dc1cc5e + e318c94 commit a7c3d4c
Show file tree
Hide file tree
Showing 227 changed files with 5,775 additions and 1,114 deletions.
28 changes: 7 additions & 21 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,26 +1,12 @@
# Code owners file.
# This file controls who is tagged for review for any given pull request.
#
# What is a "CODEOWNER"?
#
# A CODEOWNER lends their expertise to a specific package hosted by an OpenTelemetry repository.
#
# A CODEOWNER MUST:
# - introduce themselves on the CNCF OTel Python channel: https://cloud-native.slack.com/archives/C01PD4HUVBL
# - have enough knowledge of the corresponding instrumented library
# - respond to issues
# - fix failing unit tests or any other blockers to the CI/CD workflow
# - update usage of `opentelemetry-python-core` APIs upon the introduction of breaking changes
# - be a member of the OpenTelemetry community so that the `component-owners.yml` action to automatically assign CODEOWNERS to PRs works correctly.
#
# This file is only used as a way to assign any change to the approvers team
# except for a change in any of the instrumentations. The actual codeowners
# of the instrumentations are in .github/component_owners.yml.


# For anything not explicitly taken by someone else:
# Assigns any change to the approvers team...
* @open-telemetry/opentelemetry-python-contrib-approvers

# ...except for changes in any instrumentation.
/instrumentation

# Learn about CODEOWNERS file format:
# https://help.github.com/en/articles/about-code-owners
#
# Learn about membership in OpenTelemetry community:
# https://github.com/open-telemetry/community/blob/main/community-membership.md
#
18 changes: 18 additions & 0 deletions .github/component_owners.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ components:
docs/instrumentation:
- nemoshlag


instrumentation/opentelemetry-instrumentation-aio-pika:
- ofek1weiss

Expand Down Expand Up @@ -43,9 +44,26 @@ 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
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- 'release/*'
pull_request:
env:
CORE_REPO_SHA: 2387b4465d930b020df79692a8097e1d54b66ec1
CORE_REPO_SHA: 0ef76a5cc39626f783416ca75e43556e2bb2739d

jobs:
build:
Expand All @@ -24,7 +24,7 @@ jobs:
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
matrix:
python-version: [ py37, py38, py39, py310, py311, pypy3 ]
package: ["instrumentation", "distro", "exporter", "sdkextension", "propagator"]
package: ["instrumentation", "distro", "exporter", "sdkextension", "propagator", "resource"]
os: [ ubuntu-20.04 ]
steps:
- name: Checkout Contrib Repo @ SHA - ${{ github.sha }}
Expand Down
96 changes: 92 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,118 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

- `opentelemetry-instrumentation-system-metrics` Add `process.` prefix to `runtime.memory`, `runtime.cpu.time`, and `runtime.gc_count`. Change `runtime.memory` from count to UpDownCounter. ([#1735](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1735))
## Version 1.20.0/0.41b0 (2023-09-01)

### Fixed

- `opentelemetry-instrumentation-asgi` Fix UnboundLocalError local variable 'start' referenced before assignment
([#1889](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1889))
- Fixed union typing error not compatible with Python 3.7 introduced in `opentelemetry-util-http`, fix tests introduced by patch related to sanitize method for wsgi
([#1913](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1913))
- `opentelemetry-instrumentation-celery` Unwrap Celery's `ExceptionInfo` errors and report the actual exception that was raised. ([#1863](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1863))

### Added

- `opentelemetry-resource-detector-azure` Add resource detectors for Azure App Service and VM
([#1901](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1901))

## Version 1.19.0/0.40b0 (2023-07-13)
- `opentelemetry-instrumentation-asgi` Add `http.server.request.size` metric
([#1867](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1867))

### Fixed

- `opentelemetry-instrumentation-django` Fix empty span name when using
`path("", ...)` ([#1788](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1788)
- Fix elastic-search instrumentation sanitization to support bulk queries
([#1870](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1870))
- Update falcon instrumentation to follow semantic conventions
([#1824](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1824))
- Fix sqlalchemy instrumentation wrap methods to accept sqlcommenter options
([#1873](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1873))

### Added

- Add instrumentor support for cassandra and scylla
([#1902](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1902))
- Add instrumentor support for mysqlclient
([#1744](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1744))
- Fix async redis clients not being traced correctly
([#1830](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1830))
- Make Flask request span attributes available for `start_span`.
([#1784](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1784))
- Fix falcon instrumentation's usage of Span Status to only set the description if the status code is ERROR.
([#1840](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1840))
- Instrument all httpx versions >= 0.18.
([#1748](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1748))
- Fix `Invalid type NoneType for attribute X (opentelemetry-instrumentation-aws-lambda)` error when some attributes do not exist
([#1780](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1780))
- Add metric instrumentation for celery
([#1679](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1679))
- `opentelemetry-instrumentation-asgi` Add `http.server.response.size` metric
([#1789](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1789))
- `opentelemetry-instrumentation-grpc` Allow gRPC connections via Unix socket
([#1833](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1833))
- Fix elasticsearch `Transport.perform_request` instrument wrap for elasticsearch >= 8
([#1810](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1810))
- `opentelemetry-instrumentation-urllib3` Add support for urllib3 version 2
([#1879](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1879))
- Add optional distro and configurator selection for auto-instrumentation
([#1823](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1823))

### Added
- `opentelemetry-instrumentation-kafka-python` Add instrumentation to `consume` method
([#1786](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1786))

## Version 1.18.0/0.39b0 (2023-05-10)

- Update runtime metrics to follow semantic conventions
([#1735](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1735))
- Add request and response hooks for GRPC instrumentation (client only)
([#1706](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1706))
- Fix memory leak in SQLAlchemy instrumentation where disposed `Engine` does not get garbage collected
([#1771](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1771))
- `opentelemetry-instrumentation-pymemcache` Update instrumentation to support pymemcache >4
([#1764](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1764))
- `opentelemetry-instrumentation-confluent-kafka` Add support for higher versions of confluent_kafka
([#1815](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1815))

### Added

- Expand sqlalchemy pool.name to follow the semantic conventions
([#1778](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1778))
- Add `excluded_urls` functionality to `urllib` and `urllib3` instrumentations
([#1733](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1733))
- Make Django request span attributes available for `start_span`.
- Make Django request span attributes available for `start_span`.
([#1730](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1730))
- Make ASGI request span attributes available for `start_span`.
- Make ASGI request span attributes available for `start_span`.
([#1762](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1762))
- `opentelemetry-instrumentation-celery` Add support for anonymous tasks.
([#1407](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1407)
([#1407](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1407))
- `opentelemetry-instrumentation-logging` Add `otelTraceSampled` to instrumetation-logging
([#1773](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1773))

### Changed

- `opentelemetry-instrumentation-botocore` now uses the AWS X-Ray propagator by default
([#1741](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1741))

### Fixed

- Fix redis db.statements to be sanitized by default
([#1778](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1778))
- Fix elasticsearch db.statement attribute to be sanitized by default
([#1758](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1758))
- Fix `AttributeError` when AWS Lambda handler receives a list event
([#1738](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1738))
- Fix `None does not implement middleware` error when there are no middlewares registered
([#1766](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1766))
- Fix Flask instrumentation to only close the span if it was created by the same request context.
([#1692](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1692))

### Changed
- Update HTTP server/client instrumentation span names to comply with spec
([#1759](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1759))

## Version 1.17.0/0.38b0 (2023-03-22)

Expand Down Expand Up @@ -121,6 +207,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- `opentelemetry-resource-detector-container` Add support resource detection of container properties.
([#1584](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1584))
- `opentelemetry-instrumentation-pymysql` Add tests for commit() and rollback().
([#1424](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1424))
- `opentelemetry-instrumentation-fastapi` Add support for regular expression matching and sanitization of HTTP headers.
Expand Down
11 changes: 11 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,17 @@ Open a pull request against the main `opentelemetry-python-contrib` repo.
as `work-in-progress`, or mark it as [`draft`](https://github.blog/2019-02-14-introducing-draft-pull-requests/).
* Make sure CLA is signed and CI is clear.

### How to Get PRs Reviewed

The maintainers and approvers of this repo are not experts in every instrumentation there is here.
In fact each one of us knows enough about them to only review a few. Unfortunately it can be hard
to find enough experts in every instrumentation to quickly review every instrumentation PR. The
instrumentation experts are listed in `.github/component_owners.yml` with their corresponding files
or directories that they own. The owners listed there will be notified when PRs that modify their
files are opened.

If you are not getting reviews, please contact the respective owners directly.

### How to Get PRs Merged

A PR is considered to be **ready to merge** when:
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ depend on `opentelemetry-sdk` or another package that implements the API.
**Please note** that these libraries are currently in _beta_, and shouldn't
generally be used in production environments.

Unless explicitly stated otherwise, any instrumentation here for a particular library is not developed or maintained by the authors of such library.

The
[`instrumentation/`](https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation)
directory includes OpenTelemetry instrumentation packages, which can be installed
Expand Down Expand Up @@ -95,12 +97,12 @@ 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
- [Jeremy Voss](https://github.com/jeremydvoss), Microsoft
- [Sanket Mehta](https://github.com/sanketmehta28), Cisco
- [Shalev Roda](https://github.com/shalevr), Cisco

Emeritus Approvers:

- [Hector Hernandez](https://github.com/hectorhdzg), Microsoft
- [Héctor Hernández](https://github.com/hectorhdzg), Microsoft
- [Yusuke Tsutsumi](https://github.com/toumorokoshi), Google
- [Nathaniel Ruiz Nowell](https://github.com/NathanielRN), AWS
- [Ashutosh Goel](https://github.com/ashu658), Cisco
Expand All @@ -111,12 +113,13 @@ Maintainers ([@open-telemetry/python-maintainers](https://github.com/orgs/open-t

- [Diego Hurtado](https://github.com/ocelotl), Lightstep
- [Leighton Chen](https://github.com/lzchen), Microsoft
- [Srikanth Chekuri](https://github.com/srikanthccv), signoz.io
- [Shalev Roda](https://github.com/shalevr), Cisco

Emeritus Maintainers:

- [Alex Boten](https://github.com/codeboten), Lightstep
- [Owais Lone](https://github.com/owais), Splunk
- [Srikanth Chekuri](https://github.com/srikanthccv), signoz.io

*Find more about the maintainer role in [community repository](https://github.com/open-telemetry/community/blob/main/community-membership.md#maintainer).*

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.39b0.dev"
__version__ = "0.42b0.dev"
4 changes: 2 additions & 2 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ bleach==4.1.0 # transient dependency for readme-renderer
grpcio-tools==1.29.0
mypy-protobuf>=1.23
protobuf~=3.13
markupsafe==2.0.1
markupsafe>=2.0.1
codespell==2.1.0
requests==2.28.1
requests==2.31.0
ruamel.yaml==0.17.21
4 changes: 3 additions & 1 deletion docs-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,16 @@ asyncpg>=0.12.0
boto~=2.0
botocore~=1.0
boto3~=1.0
cassandra-driver~=3.25
celery>=4.0
confluent-kafka>= 1.8.2,< 2.0.0
confluent-kafka>= 1.8.2,<= 2.2.0
elasticsearch>=2.0,<9.0
flask~=2.0
falcon~=2.0
grpcio~=1.27
kafka-python>=2.0,<3.0
mysql-connector-python~=8.0
mysqlclient~=2.1.1
psutil>=5
pika>=0.12.0
pymongo~=3.1
Expand Down
8 changes: 7 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,13 @@
if isdir(join(sdk_ext, f))
]

sys.path[:0] = exp_dirs + instr_dirs + sdk_ext_dirs + prop_dirs
resource = "../resource"
resource_dirs = [
os.path.abspath("/".join(["../resource", f, "src"]))
for f in listdir(resource)
if isdir(join(resource, f))
]
sys.path[:0] = exp_dirs + instr_dirs + sdk_ext_dirs + prop_dirs + resource_dirs

# -- Project information -----------------------------------------------------

Expand Down
11 changes: 10 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Extensions

Visit `OpenTelemetry Registry <https://opentelemetry.io/registry/?s=python>`_ to
find a lot of related projects like exporters, instrumentation libraries, tracer
implementations, etc.
implementations, resource, etc.

Installing Cutting Edge Packages
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -51,6 +51,7 @@ install <https://pip.pypa.io/en/stable/reference/pip_install/#editable-installs>
pip install -e ./instrumentation/opentelemetry-instrumentation-flask
pip install -e ./instrumentation/opentelemetry-instrumentation-botocore
pip install -e ./sdk-extension/opentelemetry-sdk-extension-aws
pip install -e ./resource/opentelemetry-resource-detector-container
.. toctree::
Expand Down Expand Up @@ -85,6 +86,14 @@ install <https://pip.pypa.io/en/stable/reference/pip_install/#editable-installs>

sdk-extension/**

.. toctree::
:maxdepth: 2
:caption: OpenTelemetry Resource Detectors
:name: Resource Detectors
:glob:

resource/**

Indices and tables
------------------

Expand Down
7 changes: 7 additions & 0 deletions docs/instrumentation/cassandra/cassandra.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
OpenTelemetry Cassandra Instrumentation
=======================================

.. automodule:: opentelemetry.instrumentation.cassandra
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/instrumentation/mysqlclient/mysqlclient.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
OpenTelemetry mysqlclient Instrumentation
=========================================

.. automodule:: opentelemetry.instrumentation.mysqlclient
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/resource/container/container.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
OpenTelemetry Python - Resource Detector for Containers
=======================================================

.. automodule:: opentelemetry.resource.detector.container
:members:
:undoc-members:
:show-inheritance:
Loading

0 comments on commit a7c3d4c

Please sign in to comment.