Skip to content

Commit

Permalink
Merge branch 'main' into issue_2555, fix changelog conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
jgibo committed Aug 2, 2024
2 parents d3e0d25 + 3e18560 commit 90eb089
Show file tree
Hide file tree
Showing 270 changed files with 5,499 additions and 2,515 deletions.
1 change: 1 addition & 0 deletions .github/component_owners.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ components:
sdk-extension/opentelemetry-sdk-extension-aws:
- NathanielRN
- Kausik-A
- srprash

instrumentation/opentelemetry-instrumentation-tortoiseorm:
- tonybaloney
Expand Down
15 changes: 2 additions & 13 deletions .github/workflows/instrumentations_0.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: 141a6a2e473ef7f0ec4915dfb71e3c0fa595283e
CORE_REPO_SHA: main

jobs:
instrumentations-0:
Expand Down Expand Up @@ -66,7 +66,6 @@ jobs:
- "redis"
- "remoulade"
- "requests"
- "sklearn"
- "sqlalchemy"
- "sqlite3"
- "starlette"
Expand All @@ -75,14 +74,6 @@ jobs:
- "tortoiseorm"
os: [ubuntu-20.04]
exclude:
- python-version: py39
package: "sklearn"
- python-version: py310
package: "sklearn"
- python-version: py311
package: "sklearn"
- python-version: py312
package: "sklearn"
- python-version: py312
package: "boto"
- python-version: py312
Expand All @@ -103,8 +94,6 @@ jobs:
package: "remoulade"
- python-version: pypy3
package: "requests"
- python-version: pypy3
package: "sklearn"
- python-version: pypy3
package: "confluent-kafka"
- python-version: pypy3
Expand All @@ -125,6 +114,6 @@ jobs:
path: |
.tox
~/.cache/pip
key: v7-build-tox-cache-${{ env.RUN_MATRIX_COMBINATION }}-${{ hashFiles('tox.ini', 'gen-requirements.txt', 'dev-requirements.txt') }}
key: v7-build-tox-cache-${{ env.RUN_MATRIX_COMBINATION }}-${{ hashFiles('gen-requirements.txt', 'dev-requirements.txt') }}
- name: run tox
run: tox -f ${{ matrix.python-version }}-${{ matrix.package }} -- -ra
6 changes: 4 additions & 2 deletions .github/workflows/instrumentations_1.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: 141a6a2e473ef7f0ec4915dfb71e3c0fa595283e
CORE_REPO_SHA: main

jobs:
instrumentations-1:
Expand Down Expand Up @@ -38,6 +38,8 @@ jobs:
- "resource-detector-azure"
- "resource-detector-container"
- "util-http"
- "fastapislim"
- "processor-baggage"
os: [ubuntu-20.04]
exclude:
- python-version: pypy3
Expand All @@ -58,6 +60,6 @@ jobs:
path: |
.tox
~/.cache/pip
key: v7-build-tox-cache-${{ env.RUN_MATRIX_COMBINATION }}-${{ hashFiles('tox.ini', 'gen-requirements.txt', 'dev-requirements.txt') }}
key: v7-build-tox-cache-${{ env.RUN_MATRIX_COMBINATION }}-${{ hashFiles('gen-requirements.txt', 'dev-requirements.txt') }}
- name: run tox
run: tox -f ${{ matrix.python-version }}-${{ matrix.package }} -- -ra
30 changes: 1 addition & 29 deletions .github/workflows/lint.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: 141a6a2e473ef7f0ec4915dfb71e3c0fa595283e
CORE_REPO_SHA: main

jobs:
lint-3_12:
Expand Down Expand Up @@ -93,31 +93,3 @@ jobs:
key: v7-build-tox-cache-${{ matrix.package }}-${{ hashFiles('tox.ini', 'gen-requirements.txt', 'dev-requirements.txt') }}
- name: run tox
run: tox -e lint-${{ matrix.package }}

lint-3_8:
strategy:
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
matrix:
package:
- "instrumentation-sklearn"
os: [ubuntu-20.04]
runs-on: ubuntu-20.04
steps:
- name: Checkout Contrib 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: Cache tox environment
# Preserves .tox directory between runs for faster installs
uses: actions/cache@v4
with:
path: |
.tox
~/.cache/pip
key: v7-build-tox-cache-${{ matrix.package }}-${{ hashFiles('tox.ini', 'gen-requirements.txt', 'dev-requirements.txt') }}
- name: run tox
run: tox -e lint-${{ matrix.package }}
2 changes: 1 addition & 1 deletion .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: 141a6a2e473ef7f0ec4915dfb71e3c0fa595283e
CORE_REPO_SHA: main

jobs:
misc:
Expand Down
82 changes: 74 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,38 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

- `opentelemetry-instrumentation-tornado` Handle http client exception and record exception info into span
([#2563](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2563))

## Added

## Breaking changes

## Fixed

- `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
([#2746](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2746))
- `opentelemetry-instrumentation-grpc` Fixes the issue with the gRPC instrumentation not working with the 1.63.0 and higher version of gRPC
([#2483](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2484))
- `opentelemetry-instrumentation-fastapi` Fix fastapi-slim support
([#2756](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2756))
- `opentelemetry-instrumentation-aws-lambda` Fixing w3c baggage support
([#2589](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2589))
- `opentelemetry-instrumentation-celery` propagates baggage
([#2385](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2385))

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

### Added

- `opentelemetry-instrumentation-flask` Add `http.route` and `http.target` to metric attributes
([#2621](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2621))
- `opentelemetry-instrumentation-aws-lambda` Enable global propagator for AWS instrumentation
([#2708](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2708))
- `opentelemetry-instrumentation-sklearn` Deprecated the sklearn instrumentation
([#2708](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2708))
- `opentelemetry-instrumentation-pyramid` Record exceptions raised when serving a request
([#2622](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2622))
- `opentelemetry-sdk-extension-aws` Add AwsXrayLambdaPropagator
Expand All @@ -21,23 +51,54 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
([#2638](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2638))
- `opentelemetry-instrumentation-asgi` Implement new semantic convention opt-in with stable http semantic conventions
([#2610](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2610))
- `opentelemetry-instrumentation-fastapi` Implement new semantic convention opt-in with stable http semantic conventions
([#2682](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2682))
- `opentelemetry-instrumentation-httpx` Implement new semantic convention opt-in migration with stable http semantic conventions
([#2631](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2631))
- `opentelemetry-instrumentation-system-metrics` Permit to use psutil 6.0+.
([#2630](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2630))
- `opentelemetry-instrumentation-system-metrics` Add support for capture open file descriptors
([#2652](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2652))
- `opentelemetry-instrumentation-httpx` Add support for instrument client with proxy
([#2664](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2664))
- `opentelemetry-instrumentation-aiohttp-client` Implement new semantic convention opt-in migration
([#2673](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2673))
- `opentelemetry-instrumentation-django` Add `http.target` to Django duration metric attributes
([#2624](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2624))
- `opentelemetry-instrumentation-urllib3` Implement new semantic convention opt-in migration
([#2715](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2715))
- `opentelemetry-instrumentation-django` Implement new semantic convention opt-in with stable http semantic conventions
([#2714](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2714))
- `opentelemetry-instrumentation-urllib` Implement new semantic convention opt-in migration
([#2736](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2736))

### Breaking changes

- `opentelemetry-instrumentation-asgi`, `opentelemetry-instrumentation-fastapi`, `opentelemetry-instrumentation-starlette` Use `tracer` and `meter` of originating components instead of one from `asgi` middleware
([#2580](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2580))
- Populate `{method}` as `HTTP` on `_OTHER` methods from scope
- Populate `{method}` as `HTTP` on `_OTHER` methods from scope for `asgi` middleware
([#2610](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2610))

- Populate `{method}` as `HTTP` on `_OTHER` methods from scope for `fastapi` middleware
([#2682](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2682))
- `opentelemetry-instrumentation-urllib3` Populate `{method}` as `HTTP` on `_OTHER` methods for span name
([#2715](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2715))
- Populate `{method}` as `HTTP` on `_OTHER` methods from scope for `fastapi` instrumentation
([#2682](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2682))
- Populate `{method}` as `HTTP` on `_OTHER` methods from scope for `django` middleware
([#2714](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2714))
- Populate `{method}` as `HTTP` on `_OTHER` methods from scope for `urllib` instrumentation
([#2736](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2736))
- `opentelemetry-instrumentation-httpx`, `opentelemetry-instrumentation-aiohttp-client`,
`opentelemetry-instrumentation-requests` Populate `{method}` as `HTTP` on `_OTHER` methods
([#2726](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2726))
- `opentelemetry-instrumentation-fastapi` Add dependency support for fastapi-slim
([#2702](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2702))
- `opentelemetry-instrumentation-urllib3` improve request_hook, replacing `headers` and `body` parameters with a single `request_info: RequestInfo` parameter that now contains the `method` and `url` ([#2711](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2711))

### Fixed

- Handle `redis.exceptions.WatchError` as a non-error event in redis instrumentation
([#2668](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2668))
- `opentelemetry-instrumentation-httpx` Ensure httpx.get or httpx.request like methods are instrumented
([#2538](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2538))
- Add Python 3.12 support
Expand All @@ -53,17 +114,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `opentelemetry-instrumentation-asgi` Fix generation of `http.target` and `http.url` attributes for ASGI apps
using sub apps
([#2477](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2477))
- `opentelemetry-instrumentation-aws-lambda` Bugfix: AWS Lambda event source key incorrect for SNS in instrumentation library.
- `opentelemetry-instrumentation-aws-lambda` Bugfix: AWS Lambda event source key incorrect for SNS in instrumentation library.
([#2612](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2612))
- `opentelemetry-instrumentation-asyncio` instrumented `asyncio.wait_for` properly raises `asyncio.TimeoutError` as expected
([#2637](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2637))
- `opentelemetry-instrumentation-django` Handle exceptions from request/response hooks
([#2153](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2153))
- `opentelemetry-instrumentation-asgi` Removed `NET_HOST_NAME` AND `NET_HOST_PORT` from active requests count attribute
([#2610](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2610))
- `opentelemetry-instrumentation-tornado` Handle http client exception and record exception info into span
([#2563](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2563))

- `opentelemetry-instrumentation-asgi` Bugfix: Middleware did not set status code attribute on duration metrics for non-recording spans.
([#2627](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2627))
- `opentelemetry-instrumentation-mysql` Add support for `mysql-connector-python` v9
([#2751](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2751))

## Version 1.25.0/0.46b0 (2024-05-31)

Expand Down Expand Up @@ -157,6 +219,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
([#2367](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2367))


### Added
- `opentelemetry-instrumentation-fastapi` Add support for configuring header extraction via runtime constructor parameters
([#2241](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2241))

## Version 1.23.0/0.44b0 (2024-02-23)

- Drop support for 3.7
Expand All @@ -177,6 +243,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

- `opentelemetry-instrumentation-psycopg` Initial release for psycopg 3.x
- `opentelemetry-instrumentation-asgi` Add support for configuring ASGI middleware header extraction via runtime constructor parameters
([#2026](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2026))

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

Expand Down Expand Up @@ -216,8 +284,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
([#1948](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1948))
- Added schema_url (`"https://opentelemetry.io/schemas/1.11.0"`) to all metrics and traces
([#1977](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1977))
- Add support for configuring ASGI middleware header extraction via runtime constructor parameters
([#2026](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2026))

### Fixed

Expand Down
8 changes: 7 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,10 @@ The continuous integration overrides that environment variable with as per the c
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.

- Follow semantic conventions
- The instrumentation should follow the semantic conventions defined [here](https://github.com/open-telemetry/opentelemetry-specification/tree/main/specification/semantic-conventions.md)
- The instrumentation should follow the semantic conventions defined [here](https://github.com/open-telemetry/semantic-conventions/tree/main/docs).
- To ensure consistency, we encourage contributions that align with [STABLE](https://opentelemetry.io/docs/specs/otel/document-status/#lifecycle-status) semantic conventions if available. This approach helps us avoid potential confusion and reduces the need to support multiple outdated versions of semantic conventions. However, we are still open to considering exceptional cases where changes are well justified.
- Contributions related to outdated HTTP semantic conventions (conventions prior to becoming [stable](https://github.com/open-telemetry/semantic-conventions/tree/v1.23.0)) will likely be discouraged, as they increase complexity and the potential for misconceptions.
- Contains a name that is not already claimed in [Pypi](https://pypi.org/). Contact a maintainer, bring the issue up in the weekly Python SIG or create a ticket in Pypi if a desired name has already been taken.
- Extends from [BaseInstrumentor](https://github.com/open-telemetry/opentelemetry-python-contrib/blob/2518a4ac07cb62ad6587dd8f6cbb5f8663a7e179/opentelemetry-instrumentation/src/opentelemetry/instrumentation/instrumentor.py#L35)
- Supports auto-instrumentation
- Add an entry point (ex. <https://github.com/open-telemetry/opentelemetry-python-contrib/blob/2518a4ac07cb62ad6587dd8f6cbb5f8663a7e179/instrumentation/opentelemetry-instrumentation-requests/pyproject.toml#L44>)
Expand All @@ -269,6 +272,9 @@ Below is a checklist of things to be mindful of when implementing a new instrume
- ex. <https://github.com/open-telemetry/opentelemetry-python-contrib/blob/2518a4ac07cb62ad6587dd8f6cbb5f8663a7e179/instrumentation/opentelemetry-instrumentation-requests/src/opentelemetry/instrumentation/requests/__init__.py#L234>
- Appropriate error handling
- ex. <https://github.com/open-telemetry/opentelemetry-python-contrib/blob/2518a4ac07cb62ad6587dd8f6cbb5f8663a7e179/instrumentation/opentelemetry-instrumentation-requests/src/opentelemetry/instrumentation/requests/__init__.py#L220>
- 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>

## Expectations from contributors

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ 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
Expand Down
4 changes: 4 additions & 0 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@
<https://readthedocs.org/projects/opentelemetry-python/builds/>.
If the build has not run automatically, it can be manually trigger via the readthedocs interface.

## Releasing dev version of new packages to claim namespace

When a contribution introduces a new package, in order to mitigate name-squatting incidents, release the current development version of the new package under the `opentelemetry` user to simply claim the namespace. This should be done shortly after the PR that introduced this package has been merged into `main`.

## Troubleshooting

### Publish failed
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.47b0.dev"
__version__ = "0.48b0.dev"
5 changes: 2 additions & 3 deletions eachdist.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ sortfirst=
ext/*

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

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

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

packages=
all
Expand All @@ -54,7 +54,6 @@ packages=
[lintroots]
extraroots=examples/*,scripts/
subglob=*.py,tests/,test/,src/*,examples/*
ignore=sklearn

[testroots]
extraroots=examples/*,tests/
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.47b0.dev"
__version__ = "0.48b0.dev"
Loading

0 comments on commit 90eb089

Please sign in to comment.