Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
a340f67
chore: update OpenTelemetry dependencies to 1.42.1/0.63b1
invalid-email-address Jun 9, 2026
b4ca6d7
Merge branch 'main' into nightly-dependency-updates
liustve Jun 11, 2026
7d084dc
Merge branch 'main' into nightly-dependency-updates
liustve Jun 12, 2026
6b97f14
Merge branch 'main' into nightly-dependency-updates
liustve Jun 15, 2026
58718ab
chore(deps): drop opentelemetry-instrumentation-boto
liustve Jun 15, 2026
f692018
chore(deps): drop Python 3.9 support
liustve Jun 15, 2026
8533419
Merge branch 'main' into nightly-dependency-updates
liustve Jun 15, 2026
ebe0c02
fix(deps): bump opentelemetry-instrumentation-threading to 0.63b1
liustve Jun 15, 2026
7255e74
chore(deps): add Python 3.14 classifier
liustve Jun 15, 2026
41751da
Merge branch 'main' into nightly-dependency-updates
liustve Jun 16, 2026
345792a
fix(deps): switch importlib_metadata import to stdlib importlib.metadata
liustve Jun 16, 2026
8ed1b03
fix(botocore): adapt patches to ExtensionRegistry API in contrib 0.63b1
liustve Jun 16, 2026
40f6478
chore(starlette): drop ASGI suppress_http_instrumentation patch
liustve Jun 16, 2026
3b9bb0d
test(starlette): keep suppress_http_instrumentation test as upstream …
liustve Jun 16, 2026
dbbc938
Merge branch 'main' into nightly-dependency-updates
liustve Jun 16, 2026
807e92b
test: adapt tests to upstream 0.63b1 API changes
liustve Jun 16, 2026
3ce07b1
style: apply black/isort/flake8 formatting
liustve Jun 16, 2026
5646074
Merge branch 'main' into nightly-dependency-updates
liustve Jun 16, 2026
99948d7
Merge branch 'main' into nightly-dependency-updates
liustve Jun 16, 2026
1c9cb7f
fix(contract-tests): bump mysqlclient to 2.2.8 so db.name is populated
liustve Jun 16, 2026
aaa9d80
test(mysqlclient): drop overrides; mysqlclient 2.2.8 spans now match …
liustve Jun 16, 2026
7dc232e
Merge branch 'main' into nightly-dependency-updates
liustve Jun 16, 2026
d6cb052
test(debugger): align DI hit-limit tests with SDK MaxHits semantics
liustve Jun 16, 2026
de1b542
Merge branch 'main' into nightly-dependency-updates
liustve Jun 16, 2026
d58e73f
Merge branch 'fix/di-hit-limit-test-expectations' into nightly-depend…
liustve Jun 16, 2026
848682e
Merge branch 'main' into nightly-dependency-updates
liustve Jun 17, 2026
5cf93b2
docs: add changelog entry for #762
liustve Jun 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 0 additions & 35 deletions .coveragerc-py39

This file was deleted.

4 changes: 1 addition & 3 deletions .github/actions/set_up/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@ runs:
shell: bash
run: |
pip install coverage
if [ "${{ inputs.python_version }}" = "3.9" ]; then
RCFILE=.coveragerc-py39
elif [ "${{ inputs.python_version }}" = "3.14" ]; then
if [ "${{ inputs.python_version }}" = "3.14" ]; then
RCFILE=.coveragerc-py314
else
RCFILE=.coveragerc
Expand Down
23 changes: 6 additions & 17 deletions .github/workflows/application-signals-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,6 @@ jobs:
# DEFAULT SETTING: {Python Version}, EC2, AMD64, AL2
#

default-py39-amd64:
needs: [ upload-main-build ]
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/python-ec2-default-test.yml@main
secrets: inherit
with:
aws-region: us-east-1
caller-workflow-name: 'main-build'
python-version: '3.9'
cpu-architecture: 'x86_64'
staging-wheel-name: ${{ inputs.staging-wheel-name }}

default-py310-amd64:
needs: [ upload-main-build ]
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/python-ec2-default-test.yml@main
Expand Down Expand Up @@ -186,17 +175,17 @@ jobs:

#
# PACKAGED DISTRIBUTION PLATFORM COVERAGE
# DEFAULT SETTING: Python 3.9, {Platform}, AMD64, AL2
# DEFAULT SETTING: Python 3.10, {Platform}, AMD64, AL2
#

asg-py39-amd64:
asg-py310-amd64:
needs: [ upload-main-build ]
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/python-ec2-asg-test.yml@main
secrets: inherit
with:
aws-region: us-east-1
caller-workflow-name: 'main-build'
python-version: '3.9'
python-version: '3.10'
staging-wheel-name: ${{ inputs.staging-wheel-name }}

#
Expand Down Expand Up @@ -225,17 +214,17 @@ jobs:

#
# CPU ARCHITECTURE COVERAGE
# DEFAULT SETTING: Python 3.9, EC2, {CPU Architecture}, AL2
# DEFAULT SETTING: Python 3.10, EC2, {CPU Architecture}, AL2
#

default-py39-arm64:
default-py310-arm64:
needs: [ upload-main-build ]
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/python-ec2-default-test.yml@main
secrets: inherit
with:
aws-region: us-east-1
caller-workflow-name: 'main-build'
python-version: '3.9'
python-version: '3.10'
cpu-architecture: 'arm64'
staging-wheel-name: ${{ inputs.staging-wheel-name }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ jobs:
strategy:
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- name: Checkout Repo @ SHA - ${{ github.sha }}
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #5.0.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-instrumentation-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
tox-env:
- test-aws-opentelemetry-distro-langchain
- test-aws-opentelemetry-distro-crewai
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ If your change does not need a CHANGELOG entry, add the "skip changelog" label t

## Unreleased

- Nightly dependency update: OpenTelemetry 1.42.1/0.63b1
([#762](https://github.com/aws-observability/aws-otel-python-instrumentation/pull/762))
- 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
([#769](https://github.com/aws-observability/aws-otel-python-instrumentation/pull/769))
- 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`
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ This project is licensed under the Apache-2.0 License.
## Notices

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

### Note on Amazon CloudWatch Application Signals
[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.
Expand Down
119 changes: 59 additions & 60 deletions aws-opentelemetry-distro/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dynamic = ["version"]
description = "AWS OpenTelemetry Python Distro"
readme = "README.rst"
license = {text = "Apache-2.0"}
requires-python = ">=3.9"
requires-python = ">=3.10"
authors = [
{ name = "Amazon Web Services" },
]
Expand All @@ -18,72 +18,71 @@ classifiers = [
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]

dependencies = [
"opentelemetry-api == 1.40.0",
"opentelemetry-sdk == 1.40.0",
"opentelemetry-exporter-otlp-proto-grpc == 1.40.0",
"opentelemetry-exporter-otlp-proto-http == 1.40.0",
"opentelemetry-propagator-b3 == 1.40.0",
"opentelemetry-propagator-jaeger == 1.40.0",
"opentelemetry-exporter-otlp-proto-common == 1.40.0",
"opentelemetry-api == 1.42.1",
"opentelemetry-sdk == 1.42.1",
"opentelemetry-exporter-otlp-proto-grpc == 1.42.1",
"opentelemetry-exporter-otlp-proto-http == 1.42.1",
"opentelemetry-propagator-b3 == 1.42.1",
"opentelemetry-propagator-jaeger == 1.42.1",
"opentelemetry-exporter-otlp-proto-common == 1.42.1",
"opentelemetry-sdk-extension-aws == 2.1.0",
"opentelemetry-propagator-aws-xray == 1.0.2",
"opentelemetry-distro == 0.61b0",
"opentelemetry-processor-baggage == 0.61b0",
"opentelemetry-propagator-ot-trace == 0.61b0",
"opentelemetry-instrumentation == 0.61b0",
"opentelemetry-instrumentation-aws-lambda == 0.61b0",
"opentelemetry-instrumentation-aio-pika == 0.61b0",
"opentelemetry-instrumentation-aiohttp-client == 0.61b0",
"opentelemetry-instrumentation-aiokafka == 0.61b0",
"opentelemetry-instrumentation-aiopg == 0.61b0",
"opentelemetry-instrumentation-asgi == 0.61b0",
"opentelemetry-instrumentation-asyncpg == 0.61b0",
"opentelemetry-instrumentation-boto == 0.61b0",
"opentelemetry-instrumentation-boto3sqs == 0.61b0",
"opentelemetry-instrumentation-botocore == 0.61b0",
"opentelemetry-instrumentation-celery == 0.61b0",
"opentelemetry-instrumentation-confluent-kafka == 0.61b0",
"opentelemetry-instrumentation-dbapi == 0.61b0",
"opentelemetry-instrumentation-django == 0.61b0",
"opentelemetry-instrumentation-elasticsearch == 0.61b0",
"opentelemetry-instrumentation-falcon == 0.61b0",
"opentelemetry-instrumentation-fastapi == 0.61b0",
"opentelemetry-instrumentation-flask == 0.61b0",
"opentelemetry-instrumentation-grpc == 0.61b0",
"opentelemetry-instrumentation-httpx == 0.61b0",
"opentelemetry-instrumentation-jinja2 == 0.61b0",
"opentelemetry-instrumentation-kafka-python == 0.61b0",
"opentelemetry-instrumentation-logging == 0.61b0",
"opentelemetry-instrumentation-mysql == 0.61b0",
"opentelemetry-instrumentation-mysqlclient == 0.61b0",
"opentelemetry-instrumentation-pika == 0.61b0",
"opentelemetry-instrumentation-psycopg2 == 0.61b0",
"opentelemetry-instrumentation-pymemcache == 0.61b0",
"opentelemetry-instrumentation-pymongo == 0.61b0",
"opentelemetry-instrumentation-pymysql == 0.61b0",
"opentelemetry-instrumentation-pyramid == 0.61b0",
"opentelemetry-instrumentation-redis == 0.61b0",
"opentelemetry-instrumentation-remoulade == 0.61b0",
"opentelemetry-instrumentation-requests == 0.61b0",
"opentelemetry-instrumentation-sqlalchemy == 0.61b0",
"opentelemetry-instrumentation-sqlite3 == 0.61b0",
"opentelemetry-instrumentation-starlette == 0.61b0",
"opentelemetry-instrumentation-system-metrics == 0.61b0",
"opentelemetry-instrumentation-threading == 0.61b0",
"opentelemetry-instrumentation-tornado == 0.61b0",
"opentelemetry-instrumentation-tortoiseorm == 0.61b0",
"opentelemetry-instrumentation-urllib == 0.61b0",
"opentelemetry-instrumentation-urllib3 == 0.61b0",
"opentelemetry-instrumentation-wsgi == 0.61b0",
"opentelemetry-instrumentation-cassandra == 0.61b0",
"opentelemetry-distro == 0.63b1",
"opentelemetry-processor-baggage == 0.63b1",
"opentelemetry-propagator-ot-trace == 0.63b1",
"opentelemetry-instrumentation == 0.63b1",
"opentelemetry-instrumentation-aws-lambda == 0.63b1",
"opentelemetry-instrumentation-aio-pika == 0.63b1",
"opentelemetry-instrumentation-aiohttp-client == 0.63b1",
"opentelemetry-instrumentation-aiokafka == 0.63b1",
"opentelemetry-instrumentation-aiopg == 0.63b1",
"opentelemetry-instrumentation-asgi == 0.63b1",
"opentelemetry-instrumentation-asyncpg == 0.63b1",
"opentelemetry-instrumentation-boto3sqs == 0.63b1",
"opentelemetry-instrumentation-botocore == 0.63b1",
"opentelemetry-instrumentation-celery == 0.63b1",
"opentelemetry-instrumentation-confluent-kafka == 0.63b1",
"opentelemetry-instrumentation-dbapi == 0.63b1",
"opentelemetry-instrumentation-django == 0.63b1",
"opentelemetry-instrumentation-elasticsearch == 0.63b1",
"opentelemetry-instrumentation-falcon == 0.63b1",
"opentelemetry-instrumentation-fastapi == 0.63b1",
"opentelemetry-instrumentation-flask == 0.63b1",
"opentelemetry-instrumentation-grpc == 0.63b1",
"opentelemetry-instrumentation-httpx == 0.63b1",
"opentelemetry-instrumentation-jinja2 == 0.63b1",
"opentelemetry-instrumentation-kafka-python == 0.63b1",
"opentelemetry-instrumentation-logging == 0.63b1",
"opentelemetry-instrumentation-mysql == 0.63b1",
"opentelemetry-instrumentation-mysqlclient == 0.63b1",
"opentelemetry-instrumentation-pika == 0.63b1",
"opentelemetry-instrumentation-psycopg2 == 0.63b1",
"opentelemetry-instrumentation-pymemcache == 0.63b1",
"opentelemetry-instrumentation-pymongo == 0.63b1",
"opentelemetry-instrumentation-pymysql == 0.63b1",
"opentelemetry-instrumentation-pyramid == 0.63b1",
"opentelemetry-instrumentation-redis == 0.63b1",
"opentelemetry-instrumentation-remoulade == 0.63b1",
"opentelemetry-instrumentation-requests == 0.63b1",
"opentelemetry-instrumentation-sqlalchemy == 0.63b1",
"opentelemetry-instrumentation-sqlite3 == 0.63b1",
"opentelemetry-instrumentation-starlette == 0.63b1",
"opentelemetry-instrumentation-system-metrics == 0.63b1",
"opentelemetry-instrumentation-threading == 0.63b1",
"opentelemetry-instrumentation-tornado == 0.63b1",
"opentelemetry-instrumentation-tortoiseorm == 0.63b1",
"opentelemetry-instrumentation-urllib == 0.63b1",
"opentelemetry-instrumentation-urllib3 == 0.63b1",
"opentelemetry-instrumentation-wsgi == 0.63b1",
"opentelemetry-instrumentation-cassandra == 0.63b1",
"opentelemetry-instrumentation-openai-agents-v2 == 0.1.0",
"cachetools == 6.2.4",
"urllib3 >= 2.7.0; python_version >= '3.10'",
Expand All @@ -93,9 +92,9 @@ dependencies = [
# (debugger/_data_models.py). Required on all supported Python versions, hence a core dependency.
"python-dateutil >= 2.7.0",
# Used by Dynamic Instrumentation's bytecode-injection engine for line-level instrumentation on
# Python 3.9-3.11 (3.12+ uses the built-in sys.monitoring instead, so the marker excludes it there).
# Python 3.10-3.11 (3.12+ uses the built-in sys.monitoring instead, so the marker excludes it there).
# A core dependency so `pip install aws-opentelemetry-distro` gives a fully working feature with no extras.
"bytecode; python_version >= '3.9' and python_version < '3.12'",
"bytecode; python_version >= '3.10' and python_version < '3.12'",
]

[project.optional-dependencies]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def should_add_application_signals_dimensions() -> bool:

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


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
import logging
import os
import re
from importlib.metadata import version
from logging import Logger, getLogger
from pathlib import Path
from typing import ClassVar, Dict, List, NamedTuple, Optional, Type, Union

import yaml
from importlib_metadata import version
from typing_extensions import override

from amazon.opentelemetry.distro._aws_attribute_keys import AWS_LOCAL_SERVICE, AWS_SERVICE_TYPE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3596,7 +3596,6 @@ autoevals
keyrings-codeartifact
lpips
ldapdomaindump
opentelemetry-instrumentation-boto
suds-py3
appengine-python-standard
litellm-proxy-extras
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Bytecode injection engine for live debugger.
This module handles the injection of breakpoint calls into Python functions
using bytecode injection for Python 3.9-3.11.
using bytecode injection for Python 3.10-3.11.
"""

import inspect
Expand Down Expand Up @@ -71,7 +71,7 @@ class InjectionState:

class BytecodeInjectionEngine(InstrumentationEngine):
"""
Bytecode injection engine for line-level debugging on Python 3.9-3.11.
Bytecode injection engine for line-level debugging on Python 3.10-3.11.
Safety guarantees:
- Never crashes the application (comprehensive exception handling)
Expand All @@ -95,7 +95,7 @@ def __init__(self):
if not IS_BYTECODE_INSTALLED:
logger.warning(
"bytecode library not available. "
"Debugger will not function on Python 3.9-3.11. "
"Debugger will not function on Python 3.10-3.11. "
"Install with: pip install bytecode"
)

Expand Down Expand Up @@ -123,8 +123,8 @@ def initialize(self, hit_count_callback=None) -> None:

@staticmethod
def supports_runtime() -> bool:
"""Check if bytecode injection is supported (Python 3.9-3.11)."""
return (3, 9) <= sys.version_info < (3, 12) and IS_BYTECODE_INSTALLED
"""Check if bytecode injection is supported (Python 3.10-3.11)."""
return (3, 10) <= sys.version_info < (3, 12) and IS_BYTECODE_INSTALLED

def enable_breakpoints_for_function(
self,
Expand Down Expand Up @@ -498,8 +498,8 @@ def _create_breakpoint_instructions(self, function_key: str, line_number: int) -
try:
if sys.version_info >= (3, 11):
return self._create_breakpoint_instructions_py311(function_key, line_number)
if sys.version_info >= (3, 9):
return self._create_breakpoint_instructions_py39_py310(function_key, line_number)
if sys.version_info >= (3, 10):
return self._create_breakpoint_instructions_py310(function_key, line_number)
logger.error("Unsupported Python version: %s", sys.version_info)
return None
except Exception as exc: # pylint: disable=broad-exception-caught
Expand Down Expand Up @@ -541,14 +541,14 @@ def _create_breakpoint_instructions_py311(function_key: str, line_number: int) -
]

@staticmethod
def _create_breakpoint_instructions_py39_py310(function_key: str, line_number: int) -> list:
def _create_breakpoint_instructions_py310(function_key: str, line_number: int) -> list:
"""
Create Python 3.9/3.10-specific breakpoint instructions.
Create Python 3.10-specific breakpoint instructions.
Generates bytecode that calls:
_breakpoint_handler(function_key, line_number, locals())
Python 3.9/3.10 calling convention:
Python 3.10 calling convention:
- LOAD_GLOBAL (load _breakpoint_handler)
- LOAD_CONST (load arguments)
- LOAD_GLOBAL + CALL_FUNCTION (call locals())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
This module provides a common interface for different instrumentation mechanisms:
- SysMonitoringEngine (Python 3.12+)
- BytecodeInjectionEngine (Python 3.9-3.11)
- BytecodeInjectionEngine (Python 3.10-3.11)
"""

from abc import ABC, abstractmethod
Expand Down
Loading
Loading