Skip to content

Commit e9750eb

Browse files
aws-application-signals-botgithub-actionsliustve
authored
Nightly dependency update: OpenTelemetry 1.42.1/0.63b1 (#762)
Automated update of OpenTelemetry dependencies. **Build Status:** ❌ [failure](https://github.com/aws-observability/aws-otel-python-instrumentation/actions/runs/27184408784) **Updated versions:** - [OpenTelemetry Python](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.42.1): 1.42.1 - [OpenTelemetry Contrib](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.63b1): 0.63b1 - [opentelemetry-sdk-extension-aws](https://pypi.org/project/opentelemetry-sdk-extension-aws/2.1.0/): 2.1.0 - [opentelemetry-propagator-aws-xray](https://pypi.org/project/opentelemetry-propagator-aws-xray/1.0.2/): 1.0.2 **Upstream releases with breaking changes:** Note: the mechanism to detect upstream breaking changes is not perfect. Be sure to check all new releases and understand if any additional changes need to be addressed. **opentelemetry-python-contrib:** - [Version 1.41.0/0.62b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.62b0) *Description of changes:* - Drops the `opentelemetry-instrumentation-boto` runtime dependency (legacy boto2 instrumentation), removed entirely upstream in: open-telemetry/opentelemetry-python-contrib#4303 - Drops Python 3.9 support to match upstream's new minimum (Python ≥3.10): open-telemetry/opentelemetry-python#5076 (core) and open-telemetry/opentelemetry-python-contrib#4412 (contrib) - Switches `from importlib_metadata import version` to stdlib `from importlib.metadata import version` after upstream dropped the third-party `importlib-metadata` package from `opentelemetry-api`: open-telemetry/opentelemetry-python#3234 - Refactors the botocore patches (`_botocore_patches.py`) to use the new `ExtensionRegistry` API. Upstream split `_KNOWN_EXTENSIONS` into `_BOTOCORE_EXTENSIONS` + `_AIOBOTOCORE_EXTENSIONS`, removed `_find_extension`, and moved `_safe_invoke` to `opentelemetry.instrumentation.botocore.utils` as part of adding aiobotocore instrumentation: open-telemetry/opentelemetry-python-contrib#4049 - Removes the Starlette ASGI `suppress_http_instrumentation` patch (which the existing ADOT TODO already flagged) since the ASGI middleware now natively honors `suppress_http_instrumentation` upstream: open-telemetry/opentelemetry-python-contrib#4375 - Adapts the configurator tests to upstream's renamed `BaggageSpanProcessor._baggage_key_predicate` → `_predicates` (now a list of callables, after the constructor was reworked to accept either a single predicate or a sequence): open-telemetry/opentelemetry-python-contrib#4371 - Adapts `test_otlp_attribute_vs_body_types` to upstream's `_VALID_ANY_VALUE_TYPES` switching `typing.Mapping`/`typing.Sequence` to `collections.abc.Mapping`/`collections.abc.Sequence`: open-telemetry/opentelemetry-python#5133 - Bumps the mysqlclient contract-test pin from `2.2.4` to `2.2.8` and updates the matching `db.name` assertion. The 0.62b0 dbapi semantic-convention migration (open-telemetry/opentelemetry-python-contrib#4109) added an empty-string filter inside `_set_db_name`, which exposed a latent gap: mysqlclient < 2.2.7 didn't expose a Python-level `conn.db` attribute (added upstream in PyMySQL/mysqlclient#752, shipped in mysqlclient 2.2.7), so OTel's dbapi instrumentation defaulted `database` to `""` and the empty value used to land on the span unconditionally. After 0.62b0 the empty value is dropped, so the assertion `db.name == ""` now fails with "key not found". Bumping mysqlclient lets `conn.db` flow through as the actual database name (`testdb`) so the assertion becomes meaningful. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice. --------- Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: Steve Liu <liustve@amazon.com>
1 parent 7cc1ef5 commit e9750eb

39 files changed

Lines changed: 210 additions & 298 deletions

File tree

.coveragerc-py39

Lines changed: 0 additions & 35 deletions
This file was deleted.

.github/actions/set_up/action.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,7 @@ runs:
5555
shell: bash
5656
run: |
5757
pip install coverage
58-
if [ "${{ inputs.python_version }}" = "3.9" ]; then
59-
RCFILE=.coveragerc-py39
60-
elif [ "${{ inputs.python_version }}" = "3.14" ]; then
58+
if [ "${{ inputs.python_version }}" = "3.14" ]; then
6159
RCFILE=.coveragerc-py314
6260
else
6361
RCFILE=.coveragerc

.github/workflows/application-signals-e2e-test.yml

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,6 @@ jobs:
4646
# DEFAULT SETTING: {Python Version}, EC2, AMD64, AL2
4747
#
4848

49-
default-py39-amd64:
50-
needs: [ upload-main-build ]
51-
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/python-ec2-default-test.yml@main
52-
secrets: inherit
53-
with:
54-
aws-region: us-east-1
55-
caller-workflow-name: 'main-build'
56-
python-version: '3.9'
57-
cpu-architecture: 'x86_64'
58-
staging-wheel-name: ${{ inputs.staging-wheel-name }}
59-
6049
default-py310-amd64:
6150
needs: [ upload-main-build ]
6251
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/python-ec2-default-test.yml@main
@@ -186,17 +175,17 @@ jobs:
186175

187176
#
188177
# PACKAGED DISTRIBUTION PLATFORM COVERAGE
189-
# DEFAULT SETTING: Python 3.9, {Platform}, AMD64, AL2
178+
# DEFAULT SETTING: Python 3.10, {Platform}, AMD64, AL2
190179
#
191180

192-
asg-py39-amd64:
181+
asg-py310-amd64:
193182
needs: [ upload-main-build ]
194183
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/python-ec2-asg-test.yml@main
195184
secrets: inherit
196185
with:
197186
aws-region: us-east-1
198187
caller-workflow-name: 'main-build'
199-
python-version: '3.9'
188+
python-version: '3.10'
200189
staging-wheel-name: ${{ inputs.staging-wheel-name }}
201190

202191
#
@@ -225,17 +214,17 @@ jobs:
225214

226215
#
227216
# CPU ARCHITECTURE COVERAGE
228-
# DEFAULT SETTING: Python 3.9, EC2, {CPU Architecture}, AL2
217+
# DEFAULT SETTING: Python 3.10, EC2, {CPU Architecture}, AL2
229218
#
230219

231-
default-py39-arm64:
220+
default-py310-arm64:
232221
needs: [ upload-main-build ]
233222
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/python-ec2-default-test.yml@main
234223
secrets: inherit
235224
with:
236225
aws-region: us-east-1
237226
caller-workflow-name: 'main-build'
238-
python-version: '3.9'
227+
python-version: '3.10'
239228
cpu-architecture: 'arm64'
240229
staging-wheel-name: ${{ inputs.staging-wheel-name }}
241230

.github/workflows/pr-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ jobs:
127127
strategy:
128128
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
129129
matrix:
130-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
130+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
131131
steps:
132132
- name: Checkout Repo @ SHA - ${{ github.sha }}
133133
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #5.0.0

.github/workflows/run-instrumentation-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
fail-fast: false
1616
matrix:
17-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
17+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
1818
tox-env:
1919
- test-aws-opentelemetry-distro-langchain
2020
- test-aws-opentelemetry-distro-crewai

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ If your change does not need a CHANGELOG entry, add the "skip changelog" label t
1212

1313
## Unreleased
1414

15+
- Nightly dependency update: OpenTelemetry 1.42.1/0.63b1
16+
([#762](https://github.com/aws-observability/aws-otel-python-instrumentation/pull/762))
1517
- feat(agent-observability): add `AWS_AGENTIC_INSTRUMENTATION` (`auto`/`enabled`/`disabled`, case-insensitive) as an escape hatch over auto-detection when `AGENT_OBSERVABILITY_ENABLED=true`; the switch only governs AWS native instrumentors and never disables third-party ones
1618
([#769](https://github.com/aws-observability/aws-otel-python-instrumentation/pull/769))
1719
- fix(otlp-aws-exporter): avoid `RecursionError` when `pip_system_certs` replaces `ssl.SSLContext` (truststore injection) by rebinding stale `botocore`/`urllib3` SSL context references and caching credentials in `AwsAuthSession`

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ This project is licensed under the Apache-2.0 License.
3535
## Notices
3636

3737
### Python Version Support
38-
This project ensures compatibility with the following supported Python versions: 3.9, 3.10, 3.11, 3.12, 3.13, 3.14
38+
This project ensures compatibility with the following supported Python versions: 3.10, 3.11, 3.12, 3.13, 3.14
3939

4040
### Note on Amazon CloudWatch Application Signals
4141
[Amazon CloudWatch Application Signals](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Application-Monitoring-Sections.html) components are designed to seamlessly work with all library instrumentations offered by [OpenTelemetry Python auto-instrumentation](https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/instrumentation/README.md). While upstream OpenTelemetry Python instrumentations are in beta, Application Signals components are stable, production ready and have also been tested for popular libraries/frameworks such as [Django, Boto3, and others](https://github.com/aws-observability/aws-otel-python-instrumentation/tree/main/contract-tests/images/applications). We will prioritize backward compatibility for Application Signals components, striving to ensure that they remain functional even in the face of potential breaking changes introduced by OpenTelemetry upstream libraries. Please [raise an issue](https://github.com/aws-observability/aws-otel-python-instrumentation/blob/main/CONTRIBUTING.md#reporting-bugsfeature-requests) if you notice Application Signals doesn't work for a particular OpenTelemetry supported library.

aws-opentelemetry-distro/pyproject.toml

Lines changed: 59 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ dynamic = ["version"]
88
description = "AWS OpenTelemetry Python Distro"
99
readme = "README.rst"
1010
license = {text = "Apache-2.0"}
11-
requires-python = ">=3.9"
11+
requires-python = ">=3.10"
1212
authors = [
1313
{ name = "Amazon Web Services" },
1414
]
@@ -18,72 +18,71 @@ classifiers = [
1818
"License :: OSI Approved :: Apache Software License",
1919
"Programming Language :: Python",
2020
"Programming Language :: Python :: 3",
21-
"Programming Language :: Python :: 3.9",
2221
"Programming Language :: Python :: 3.10",
2322
"Programming Language :: Python :: 3.11",
2423
"Programming Language :: Python :: 3.12",
2524
"Programming Language :: Python :: 3.13",
25+
"Programming Language :: Python :: 3.14",
2626
]
2727

2828
dependencies = [
29-
"opentelemetry-api == 1.40.0",
30-
"opentelemetry-sdk == 1.40.0",
31-
"opentelemetry-exporter-otlp-proto-grpc == 1.40.0",
32-
"opentelemetry-exporter-otlp-proto-http == 1.40.0",
33-
"opentelemetry-propagator-b3 == 1.40.0",
34-
"opentelemetry-propagator-jaeger == 1.40.0",
35-
"opentelemetry-exporter-otlp-proto-common == 1.40.0",
29+
"opentelemetry-api == 1.42.1",
30+
"opentelemetry-sdk == 1.42.1",
31+
"opentelemetry-exporter-otlp-proto-grpc == 1.42.1",
32+
"opentelemetry-exporter-otlp-proto-http == 1.42.1",
33+
"opentelemetry-propagator-b3 == 1.42.1",
34+
"opentelemetry-propagator-jaeger == 1.42.1",
35+
"opentelemetry-exporter-otlp-proto-common == 1.42.1",
3636
"opentelemetry-sdk-extension-aws == 2.1.0",
3737
"opentelemetry-propagator-aws-xray == 1.0.2",
38-
"opentelemetry-distro == 0.61b0",
39-
"opentelemetry-processor-baggage == 0.61b0",
40-
"opentelemetry-propagator-ot-trace == 0.61b0",
41-
"opentelemetry-instrumentation == 0.61b0",
42-
"opentelemetry-instrumentation-aws-lambda == 0.61b0",
43-
"opentelemetry-instrumentation-aio-pika == 0.61b0",
44-
"opentelemetry-instrumentation-aiohttp-client == 0.61b0",
45-
"opentelemetry-instrumentation-aiokafka == 0.61b0",
46-
"opentelemetry-instrumentation-aiopg == 0.61b0",
47-
"opentelemetry-instrumentation-asgi == 0.61b0",
48-
"opentelemetry-instrumentation-asyncpg == 0.61b0",
49-
"opentelemetry-instrumentation-boto == 0.61b0",
50-
"opentelemetry-instrumentation-boto3sqs == 0.61b0",
51-
"opentelemetry-instrumentation-botocore == 0.61b0",
52-
"opentelemetry-instrumentation-celery == 0.61b0",
53-
"opentelemetry-instrumentation-confluent-kafka == 0.61b0",
54-
"opentelemetry-instrumentation-dbapi == 0.61b0",
55-
"opentelemetry-instrumentation-django == 0.61b0",
56-
"opentelemetry-instrumentation-elasticsearch == 0.61b0",
57-
"opentelemetry-instrumentation-falcon == 0.61b0",
58-
"opentelemetry-instrumentation-fastapi == 0.61b0",
59-
"opentelemetry-instrumentation-flask == 0.61b0",
60-
"opentelemetry-instrumentation-grpc == 0.61b0",
61-
"opentelemetry-instrumentation-httpx == 0.61b0",
62-
"opentelemetry-instrumentation-jinja2 == 0.61b0",
63-
"opentelemetry-instrumentation-kafka-python == 0.61b0",
64-
"opentelemetry-instrumentation-logging == 0.61b0",
65-
"opentelemetry-instrumentation-mysql == 0.61b0",
66-
"opentelemetry-instrumentation-mysqlclient == 0.61b0",
67-
"opentelemetry-instrumentation-pika == 0.61b0",
68-
"opentelemetry-instrumentation-psycopg2 == 0.61b0",
69-
"opentelemetry-instrumentation-pymemcache == 0.61b0",
70-
"opentelemetry-instrumentation-pymongo == 0.61b0",
71-
"opentelemetry-instrumentation-pymysql == 0.61b0",
72-
"opentelemetry-instrumentation-pyramid == 0.61b0",
73-
"opentelemetry-instrumentation-redis == 0.61b0",
74-
"opentelemetry-instrumentation-remoulade == 0.61b0",
75-
"opentelemetry-instrumentation-requests == 0.61b0",
76-
"opentelemetry-instrumentation-sqlalchemy == 0.61b0",
77-
"opentelemetry-instrumentation-sqlite3 == 0.61b0",
78-
"opentelemetry-instrumentation-starlette == 0.61b0",
79-
"opentelemetry-instrumentation-system-metrics == 0.61b0",
80-
"opentelemetry-instrumentation-threading == 0.61b0",
81-
"opentelemetry-instrumentation-tornado == 0.61b0",
82-
"opentelemetry-instrumentation-tortoiseorm == 0.61b0",
83-
"opentelemetry-instrumentation-urllib == 0.61b0",
84-
"opentelemetry-instrumentation-urllib3 == 0.61b0",
85-
"opentelemetry-instrumentation-wsgi == 0.61b0",
86-
"opentelemetry-instrumentation-cassandra == 0.61b0",
38+
"opentelemetry-distro == 0.63b1",
39+
"opentelemetry-processor-baggage == 0.63b1",
40+
"opentelemetry-propagator-ot-trace == 0.63b1",
41+
"opentelemetry-instrumentation == 0.63b1",
42+
"opentelemetry-instrumentation-aws-lambda == 0.63b1",
43+
"opentelemetry-instrumentation-aio-pika == 0.63b1",
44+
"opentelemetry-instrumentation-aiohttp-client == 0.63b1",
45+
"opentelemetry-instrumentation-aiokafka == 0.63b1",
46+
"opentelemetry-instrumentation-aiopg == 0.63b1",
47+
"opentelemetry-instrumentation-asgi == 0.63b1",
48+
"opentelemetry-instrumentation-asyncpg == 0.63b1",
49+
"opentelemetry-instrumentation-boto3sqs == 0.63b1",
50+
"opentelemetry-instrumentation-botocore == 0.63b1",
51+
"opentelemetry-instrumentation-celery == 0.63b1",
52+
"opentelemetry-instrumentation-confluent-kafka == 0.63b1",
53+
"opentelemetry-instrumentation-dbapi == 0.63b1",
54+
"opentelemetry-instrumentation-django == 0.63b1",
55+
"opentelemetry-instrumentation-elasticsearch == 0.63b1",
56+
"opentelemetry-instrumentation-falcon == 0.63b1",
57+
"opentelemetry-instrumentation-fastapi == 0.63b1",
58+
"opentelemetry-instrumentation-flask == 0.63b1",
59+
"opentelemetry-instrumentation-grpc == 0.63b1",
60+
"opentelemetry-instrumentation-httpx == 0.63b1",
61+
"opentelemetry-instrumentation-jinja2 == 0.63b1",
62+
"opentelemetry-instrumentation-kafka-python == 0.63b1",
63+
"opentelemetry-instrumentation-logging == 0.63b1",
64+
"opentelemetry-instrumentation-mysql == 0.63b1",
65+
"opentelemetry-instrumentation-mysqlclient == 0.63b1",
66+
"opentelemetry-instrumentation-pika == 0.63b1",
67+
"opentelemetry-instrumentation-psycopg2 == 0.63b1",
68+
"opentelemetry-instrumentation-pymemcache == 0.63b1",
69+
"opentelemetry-instrumentation-pymongo == 0.63b1",
70+
"opentelemetry-instrumentation-pymysql == 0.63b1",
71+
"opentelemetry-instrumentation-pyramid == 0.63b1",
72+
"opentelemetry-instrumentation-redis == 0.63b1",
73+
"opentelemetry-instrumentation-remoulade == 0.63b1",
74+
"opentelemetry-instrumentation-requests == 0.63b1",
75+
"opentelemetry-instrumentation-sqlalchemy == 0.63b1",
76+
"opentelemetry-instrumentation-sqlite3 == 0.63b1",
77+
"opentelemetry-instrumentation-starlette == 0.63b1",
78+
"opentelemetry-instrumentation-system-metrics == 0.63b1",
79+
"opentelemetry-instrumentation-threading == 0.63b1",
80+
"opentelemetry-instrumentation-tornado == 0.63b1",
81+
"opentelemetry-instrumentation-tortoiseorm == 0.63b1",
82+
"opentelemetry-instrumentation-urllib == 0.63b1",
83+
"opentelemetry-instrumentation-urllib3 == 0.63b1",
84+
"opentelemetry-instrumentation-wsgi == 0.63b1",
85+
"opentelemetry-instrumentation-cassandra == 0.63b1",
8786
"opentelemetry-instrumentation-openai-agents-v2 == 0.1.0",
8887
"cachetools == 6.2.4",
8988
"urllib3 >= 2.7.0; python_version >= '3.10'",
@@ -93,9 +92,9 @@ dependencies = [
9392
# (debugger/_data_models.py). Required on all supported Python versions, hence a core dependency.
9493
"python-dateutil >= 2.7.0",
9594
# Used by Dynamic Instrumentation's bytecode-injection engine for line-level instrumentation on
96-
# Python 3.9-3.11 (3.12+ uses the built-in sys.monitoring instead, so the marker excludes it there).
95+
# Python 3.10-3.11 (3.12+ uses the built-in sys.monitoring instead, so the marker excludes it there).
9796
# A core dependency so `pip install aws-opentelemetry-distro` gives a fully working feature with no extras.
98-
"bytecode; python_version >= '3.9' and python_version < '3.12'",
97+
"bytecode; python_version >= '3.10' and python_version < '3.12'",
9998
]
10099

101100
[project.optional-dependencies]

aws-opentelemetry-distro/src/amazon/opentelemetry/distro/_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def should_add_application_signals_dimensions() -> bool:
5252

5353
IS_BOTOCORE_INSTALLED: bool = is_installed("botocore")
5454
# The 'bytecode' package is an optional dependency (the 'debugger' extra), installed only on
55-
# Python 3.9-3.11. Dynamic Instrumentation's bytecode-injection engine guards on this flag.
55+
# Python 3.10-3.11. Dynamic Instrumentation's bytecode-injection engine guards on this flag.
5656
IS_BYTECODE_INSTALLED: bool = is_installed("bytecode")
5757

5858

aws-opentelemetry-distro/src/amazon/opentelemetry/distro/aws_opentelemetry_configurator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
import logging
88
import os
99
import re
10+
from importlib.metadata import version
1011
from logging import Logger, getLogger
1112
from pathlib import Path
1213
from typing import ClassVar, Dict, List, NamedTuple, Optional, Type, Union
1314

1415
import yaml
15-
from importlib_metadata import version
1616
from typing_extensions import override
1717

1818
from amazon.opentelemetry.distro._aws_attribute_keys import AWS_LOCAL_SERVICE, AWS_SERVICE_TYPE

0 commit comments

Comments
 (0)