Skip to content

Commit 19b25ce

Browse files
authored
Merge branch 'main' into MCP-Instrumentor
2 parents d8a0ee3 + 07d9d0d commit 19b25ce

File tree

72 files changed

+9459
-990
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+9459
-990
lines changed

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

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

49-
default-py38-amd64:
49+
default-py39-amd64:
5050
needs: [ upload-main-build ]
5151
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/python-ec2-default-test.yml@main
5252
secrets: inherit
5353
with:
5454
aws-region: us-east-1
5555
caller-workflow-name: 'main-build'
56-
python-version: '3.8'
56+
python-version: '3.9'
5757
cpu-architecture: 'x86_64'
5858
staging-wheel-name: ${{ inputs.staging-wheel-name }}
5959

60-
default-py39-amd64:
60+
default-py310-amd64:
6161
needs: [ upload-main-build ]
6262
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/python-ec2-default-test.yml@main
6363
secrets: inherit
6464
with:
6565
aws-region: us-east-1
6666
caller-workflow-name: 'main-build'
67-
python-version: '3.9'
67+
python-version: '3.10'
6868
cpu-architecture: 'x86_64'
6969
staging-wheel-name: ${{ inputs.staging-wheel-name }}
7070

71-
default-py310-amd64:
71+
default-py311-amd64:
7272
needs: [ upload-main-build ]
7373
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/python-ec2-default-test.yml@main
7474
secrets: inherit
7575
with:
7676
aws-region: us-east-1
7777
caller-workflow-name: 'main-build'
78-
python-version: '3.10'
78+
python-version: '3.11'
7979
cpu-architecture: 'x86_64'
8080
staging-wheel-name: ${{ inputs.staging-wheel-name }}
8181

82-
default-py311-amd64:
82+
default-py312-amd64:
8383
needs: [ upload-main-build ]
8484
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/python-ec2-default-test.yml@main
8585
secrets: inherit
8686
with:
8787
aws-region: us-east-1
8888
caller-workflow-name: 'main-build'
89-
python-version: '3.11'
89+
python-version: '3.12'
9090
cpu-architecture: 'x86_64'
9191
staging-wheel-name: ${{ inputs.staging-wheel-name }}
9292

93-
default-py312-amd64:
93+
default-py313-amd64:
9494
needs: [ upload-main-build ]
9595
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/python-ec2-default-test.yml@main
9696
secrets: inherit
9797
with:
9898
aws-region: us-east-1
9999
caller-workflow-name: 'main-build'
100-
python-version: '3.12'
100+
python-version: '3.13'
101101
cpu-architecture: 'x86_64'
102102
staging-wheel-name: ${{ inputs.staging-wheel-name }}
103103

@@ -106,19 +106,8 @@ jobs:
106106
# DEFAULT SETTING: {Python Version}, EKS, AMD64, AL2
107107
#
108108

109-
eks-py38-amd64:
110-
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/python-eks-test.yml@main
111-
secrets: inherit
112-
with:
113-
aws-region: us-east-1
114-
test-cluster-name: 'e2e-python-adot-test'
115-
adot-image-name: ${{ inputs.adot-image-name }}
116-
caller-workflow-name: 'main-build'
117-
python-version: '3.8'
118-
119109
eks-py39-amd64:
120110
if: ${{ always() }}
121-
needs: eks-py38-amd64
122111
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/python-eks-test.yml@main
123112
secrets: inherit
124113
with:
@@ -164,6 +153,18 @@ jobs:
164153
caller-workflow-name: 'main-build'
165154
python-version: '3.12'
166155

156+
eks-py313-amd64:
157+
if: ${{ always() }}
158+
needs: eks-py312-amd64
159+
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/python-eks-test.yml@main
160+
secrets: inherit
161+
with:
162+
aws-region: us-east-1
163+
test-cluster-name: 'e2e-python-adot-test'
164+
adot-image-name: ${{ inputs.adot-image-name }}
165+
caller-workflow-name: 'main-build'
166+
python-version: '3.13'
167+
167168
#
168169
# PACKAGED DISTRIBUTION PLATFORM COVERAGE
169170
# DEFAULT SETTING: Python 3.9, {Platform}, AMD64, AL2
@@ -237,3 +238,12 @@ jobs:
237238
with:
238239
caller-workflow-name: 'main-build'
239240
staging-wheel-name: ${{ inputs.staging-wheel-name }}
241+
242+
# Stand-Alone ADOT/ADOT Genesis test on EC2
243+
adot-genesis:
244+
needs: [ upload-main-build ]
245+
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/python-ec2-genesis-test.yml@main
246+
secrets: inherit
247+
with:
248+
caller-workflow-name: 'main-build'
249+
staging-wheel-name: ${{ inputs.staging-wheel-name }}

.github/workflows/daily_scan.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,15 @@ jobs:
8282
id: high_scan
8383
uses: ./.github/actions/image_scan
8484
with:
85-
image-ref: "public.ecr.aws/aws-observability/adot-autoinstrumentation-python:v0.9.0"
85+
image-ref: "public.ecr.aws/aws-observability/adot-autoinstrumentation-python:v0.10.0"
8686
severity: 'CRITICAL,HIGH'
8787

8888
- name: Perform low image scan
8989
if: always()
9090
id: low_scan
9191
uses: ./.github/actions/image_scan
9292
with:
93-
image-ref: "public.ecr.aws/aws-observability/adot-autoinstrumentation-python:v0.9.0"
93+
image-ref: "public.ecr.aws/aws-observability/adot-autoinstrumentation-python:v0.10.0"
9494
severity: 'MEDIUM,LOW,UNKNOWN'
9595

9696
- name: Configure AWS Credentials for emitting metrics

.github/workflows/pr_build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
1717
matrix:
18-
python-version: ["3.8", "3.9", "3.10", "3.11"]
18+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
1919
steps:
2020
- name: Checkout Repo @ SHA - ${{ github.sha }}
2121
uses: actions/checkout@v4

.github/workflows/release-lambda.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ on:
99
aws_region:
1010
description: 'Deploy to aws regions'
1111
required: true
12-
default: 'us-east-1, us-east-2, us-west-1, us-west-2, ap-south-1, ap-northeast-3, ap-northeast-2, ap-southeast-1, ap-southeast-2, ap-northeast-1, ca-central-1, eu-central-1, eu-west-1, eu-west-2, eu-west-3, eu-north-1, sa-east-1, af-south-1, ap-east-1, ap-south-2, ap-southeast-3, ap-southeast-4, eu-central-2, eu-south-1, eu-south-2, il-central-1, me-central-1, me-south-1'
12+
default: 'us-east-1, us-east-2, us-west-1, us-west-2, ap-south-1, ap-northeast-3, ap-northeast-2, ap-southeast-1, ap-southeast-2, ap-northeast-1, ca-central-1, eu-central-1, eu-west-1, eu-west-2, eu-west-3, eu-north-1, sa-east-1, af-south-1, ap-east-1, ap-south-2, ap-southeast-3, ap-southeast-4, eu-central-2, eu-south-1, eu-south-2, il-central-1, me-central-1, me-south-1, ap-southeast-5, ap-southeast-7, mx-central-1, ca-west-1, cn-north-1, cn-northwest-1'
1313

1414
env:
15-
COMMERCIAL_REGIONS: us-east-1, us-east-2, us-west-1, us-west-2, ap-south-1, ap-northeast-3, ap-northeast-2, ap-southeast-1, ap-southeast-2, ap-northeast-1, ca-central-1, eu-central-1, eu-west-1, eu-west-2, eu-west-3, eu-north-1, sa-east-1
15+
COMMERCIAL_REGIONS: us-east-1, us-east-2, us-west-1, us-west-2, ap-south-1, ap-northeast-3, ap-northeast-2, ap-southeast-1, ap-southeast-2, ap-northeast-1, ca-central-1, eu-central-1, eu-west-1, eu-west-2, eu-west-3, eu-north-1, sa-east-1, ap-southeast-5, ap-southeast-7, mx-central-1, ca-west-1, cn-north-1, cn-northwest-1
1616
LAYER_NAME: AWSOpenTelemetryDistroPython
1717

1818
permissions:
@@ -21,6 +21,7 @@ permissions:
2121

2222
jobs:
2323
build-layer:
24+
environment: Release
2425
runs-on: ubuntu-latest
2526
outputs:
2627
aws_regions_json: ${{ steps.set-matrix.outputs.aws_regions_json }}

Dockerfile

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,10 @@ ADD aws-opentelemetry-distro/ ./aws-opentelemetry-distro/
1818
# * https://github.com/MicrosoftDocs/azure-docs/blob/main/articles/azure-functions/recover-python-functions.md#troubleshoot-cannot-import-cygrpc
1919
RUN sed -i "/opentelemetry-exporter-otlp-proto-grpc/d" ./aws-opentelemetry-distro/pyproject.toml
2020

21-
# urllib3 recently made a release that drops support for Python 3.8
22-
# Our sdk depends on botocore which pulls in the version of urllib3 based Python runtime it detects.
23-
# The rule is that if current pip command version is > 3.9 botocore will pick up the latest urllib3,
24-
# otherwise it picks up the older urllib3 that is compatible with Python 3.8.
25-
# https://github.com/boto/botocore/blob/develop/requirements-docs.txt
26-
# Since this Dockerfile currently uses the fixed Python 3.11 base image to pull the required dependencies,
27-
# EKS and ECS applications will encounter a runtime error for Python 3.8 compatibility.
28-
# Our fix is to temporarily restrict the urllib3 version to one that works for all supported Python versions
29-
# that we currently commit to support (notably 3.8).
30-
# We also pin the setuptools version for similar issues with the library dropping 3.8 support.
31-
# https://github.com/pypa/setuptools/blame/main/pkg_resources/__init__.py#L24
32-
# TODO: Remove these temporary workarounds once we deprecate Python 3.8 support since it has reached end-of-life.
33-
RUN mkdir workspace && pip install setuptools==75.2.0 urllib3==2.2.3 --target workspace ./aws-opentelemetry-distro
21+
RUN mkdir workspace && pip install --target workspace ./aws-opentelemetry-distro
3422

3523
# Stage 2: Build the cp-utility binary
36-
FROM public.ecr.aws/docker/library/rust:1.82 as builder
24+
FROM public.ecr.aws/docker/library/rust:1.87 as builder
3725

3826
WORKDIR /usr/src/cp-utility
3927
COPY ./tools/cp-utility .

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.8, 3.9, 3.10, 3.11, 3.12
38+
This project ensures compatibility with the following supported Python versions: 3.9, 3.10, 3.11, 3.12, 3.13
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: 57 additions & 55 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 = "Apache-2.0"
11-
requires-python = ">=3.8"
11+
requires-python = ">=3.9"
1212
authors = [
1313
{ name = "Amazon Web Services" },
1414
]
@@ -18,68 +18,70 @@ classifiers = [
1818
"License :: OSI Approved :: Apache Software License",
1919
"Programming Language :: Python",
2020
"Programming Language :: Python :: 3",
21-
"Programming Language :: Python :: 3.8",
2221
"Programming Language :: Python :: 3.9",
2322
"Programming Language :: Python :: 3.10",
2423
"Programming Language :: Python :: 3.11",
24+
"Programming Language :: Python :: 3.12",
25+
"Programming Language :: Python :: 3.13",
2526
]
2627

2728
dependencies = [
28-
"opentelemetry-api == 1.27.0",
29-
"opentelemetry-sdk == 1.27.0",
30-
"opentelemetry-exporter-otlp-proto-grpc == 1.27.0",
31-
"opentelemetry-exporter-otlp-proto-http == 1.27.0",
32-
"opentelemetry-propagator-b3 == 1.27.0",
33-
"opentelemetry-propagator-jaeger == 1.27.0",
34-
"opentelemetry-exporter-otlp-proto-common == 1.27.0",
29+
"opentelemetry-api == 1.33.1",
30+
"opentelemetry-sdk == 1.33.1",
31+
"opentelemetry-exporter-otlp-proto-grpc == 1.33.1",
32+
"opentelemetry-exporter-otlp-proto-http == 1.33.1",
33+
"opentelemetry-propagator-b3 == 1.33.1",
34+
"opentelemetry-propagator-jaeger == 1.33.1",
35+
"opentelemetry-exporter-otlp-proto-common == 1.33.1",
3536
"opentelemetry-sdk-extension-aws == 2.0.2",
3637
"opentelemetry-propagator-aws-xray == 1.0.1",
37-
"opentelemetry-distro == 0.48b0",
38-
"opentelemetry-propagator-ot-trace == 0.48b0",
39-
"opentelemetry-instrumentation == 0.48b0",
40-
"opentelemetry-instrumentation-aws-lambda == 0.48b0",
41-
"opentelemetry-instrumentation-aio-pika == 0.48b0",
42-
"opentelemetry-instrumentation-aiohttp-client == 0.48b0",
43-
"opentelemetry-instrumentation-aiopg == 0.48b0",
44-
"opentelemetry-instrumentation-asgi == 0.48b0",
45-
"opentelemetry-instrumentation-asyncpg == 0.48b0",
46-
"opentelemetry-instrumentation-boto == 0.48b0",
47-
"opentelemetry-instrumentation-boto3sqs == 0.48b0",
48-
"opentelemetry-instrumentation-botocore == 0.48b0",
49-
"opentelemetry-instrumentation-celery == 0.48b0",
50-
"opentelemetry-instrumentation-confluent-kafka == 0.48b0",
51-
"opentelemetry-instrumentation-dbapi == 0.48b0",
52-
"opentelemetry-instrumentation-django == 0.48b0",
53-
"opentelemetry-instrumentation-elasticsearch == 0.48b0",
54-
"opentelemetry-instrumentation-falcon == 0.48b0",
55-
"opentelemetry-instrumentation-fastapi == 0.48b0",
56-
"opentelemetry-instrumentation-flask == 0.48b0",
57-
"opentelemetry-instrumentation-grpc == 0.48b0",
58-
"opentelemetry-instrumentation-httpx == 0.48b0",
59-
"opentelemetry-instrumentation-jinja2 == 0.48b0",
60-
"opentelemetry-instrumentation-kafka-python == 0.48b0",
61-
"opentelemetry-instrumentation-logging == 0.48b0",
62-
"opentelemetry-instrumentation-mysql == 0.48b0",
63-
"opentelemetry-instrumentation-mysqlclient == 0.48b0",
64-
"opentelemetry-instrumentation-pika == 0.48b0",
65-
"opentelemetry-instrumentation-psycopg2 == 0.48b0",
66-
"opentelemetry-instrumentation-pymemcache == 0.48b0",
67-
"opentelemetry-instrumentation-pymongo == 0.48b0",
68-
"opentelemetry-instrumentation-pymysql == 0.48b0",
69-
"opentelemetry-instrumentation-pyramid == 0.48b0",
70-
"opentelemetry-instrumentation-redis == 0.48b0",
71-
"opentelemetry-instrumentation-remoulade == 0.48b0",
72-
"opentelemetry-instrumentation-requests == 0.48b0",
73-
"opentelemetry-instrumentation-sqlalchemy == 0.48b0",
74-
"opentelemetry-instrumentation-sqlite3 == 0.48b0",
75-
"opentelemetry-instrumentation-starlette == 0.48b0",
76-
"opentelemetry-instrumentation-system-metrics == 0.48b0",
77-
"opentelemetry-instrumentation-tornado == 0.48b0",
78-
"opentelemetry-instrumentation-tortoiseorm == 0.48b0",
79-
"opentelemetry-instrumentation-urllib == 0.48b0",
80-
"opentelemetry-instrumentation-urllib3 == 0.48b0",
81-
"opentelemetry-instrumentation-wsgi == 0.48b0",
82-
"opentelemetry-instrumentation-cassandra == 0.48b0",
38+
"opentelemetry-distro == 0.54b1",
39+
"opentelemetry-processor-baggage == 0.54b1",
40+
"opentelemetry-propagator-ot-trace == 0.54b1",
41+
"opentelemetry-instrumentation == 0.54b1",
42+
"opentelemetry-instrumentation-aws-lambda == 0.54b1",
43+
"opentelemetry-instrumentation-aio-pika == 0.54b1",
44+
"opentelemetry-instrumentation-aiohttp-client == 0.54b1",
45+
"opentelemetry-instrumentation-aiopg == 0.54b1",
46+
"opentelemetry-instrumentation-asgi == 0.54b1",
47+
"opentelemetry-instrumentation-asyncpg == 0.54b1",
48+
"opentelemetry-instrumentation-boto == 0.54b1",
49+
"opentelemetry-instrumentation-boto3sqs == 0.54b1",
50+
"opentelemetry-instrumentation-botocore == 0.54b1",
51+
"opentelemetry-instrumentation-celery == 0.54b1",
52+
"opentelemetry-instrumentation-confluent-kafka == 0.54b1",
53+
"opentelemetry-instrumentation-dbapi == 0.54b1",
54+
"opentelemetry-instrumentation-django == 0.54b1",
55+
"opentelemetry-instrumentation-elasticsearch == 0.54b1",
56+
"opentelemetry-instrumentation-falcon == 0.54b1",
57+
"opentelemetry-instrumentation-fastapi == 0.54b1",
58+
"opentelemetry-instrumentation-flask == 0.54b1",
59+
"opentelemetry-instrumentation-grpc == 0.54b1",
60+
"opentelemetry-instrumentation-httpx == 0.54b1",
61+
"opentelemetry-instrumentation-jinja2 == 0.54b1",
62+
"opentelemetry-instrumentation-kafka-python == 0.54b1",
63+
"opentelemetry-instrumentation-logging == 0.54b1",
64+
"opentelemetry-instrumentation-mysql == 0.54b1",
65+
"opentelemetry-instrumentation-mysqlclient == 0.54b1",
66+
"opentelemetry-instrumentation-pika == 0.54b1",
67+
"opentelemetry-instrumentation-psycopg2 == 0.54b1",
68+
"opentelemetry-instrumentation-pymemcache == 0.54b1",
69+
"opentelemetry-instrumentation-pymongo == 0.54b1",
70+
"opentelemetry-instrumentation-pymysql == 0.54b1",
71+
"opentelemetry-instrumentation-pyramid == 0.54b1",
72+
"opentelemetry-instrumentation-redis == 0.54b1",
73+
"opentelemetry-instrumentation-remoulade == 0.54b1",
74+
"opentelemetry-instrumentation-requests == 0.54b1",
75+
"opentelemetry-instrumentation-sqlalchemy == 0.54b1",
76+
"opentelemetry-instrumentation-sqlite3 == 0.54b1",
77+
"opentelemetry-instrumentation-starlette == 0.54b1",
78+
"opentelemetry-instrumentation-system-metrics == 0.54b1",
79+
"opentelemetry-instrumentation-tornado == 0.54b1",
80+
"opentelemetry-instrumentation-tortoiseorm == 0.54b1",
81+
"opentelemetry-instrumentation-urllib == 0.54b1",
82+
"opentelemetry-instrumentation-urllib3 == 0.54b1",
83+
"opentelemetry-instrumentation-wsgi == 0.54b1",
84+
"opentelemetry-instrumentation-cassandra == 0.54b1",
8385
]
8486

8587
[project.optional-dependencies]

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@
1818

1919
# AWS_#_NAME attributes are not supported in python as they are not part of the Semantic Conventions.
2020
# TODO:Move to Semantic Conventions when these attributes are added.
21+
AWS_AUTH_ACCESS_KEY: str = "aws.auth.account.access_key"
22+
AWS_AUTH_REGION: str = "aws.auth.region"
2123
AWS_SQS_QUEUE_URL: str = "aws.sqs.queue.url"
2224
AWS_SQS_QUEUE_NAME: str = "aws.sqs.queue.name"
25+
AWS_KINESIS_STREAM_ARN: str = "aws.kinesis.stream.arn"
2326
AWS_KINESIS_STREAM_NAME: str = "aws.kinesis.stream.name"
2427
AWS_BEDROCK_DATA_SOURCE_ID: str = "aws.bedrock.data_source.id"
2528
AWS_BEDROCK_KNOWLEDGE_BASE_ID: str = "aws.bedrock.knowledge_base.id"
@@ -33,3 +36,8 @@
3336
AWS_LAMBDA_FUNCTION_NAME: str = "aws.lambda.function.name"
3437
AWS_LAMBDA_RESOURCEMAPPING_ID: str = "aws.lambda.resource_mapping.id"
3538
AWS_LAMBDA_FUNCTION_ARN: str = "aws.lambda.function.arn"
39+
AWS_DYNAMODB_TABLE_ARN: str = "aws.dynamodb.table.arn"
40+
AWS_REMOTE_RESOURCE_ACCESS_KEY: str = "aws.remote.resource.account.access_key"
41+
AWS_REMOTE_RESOURCE_ACCOUNT_ID: str = "aws.remote.resource.account.id"
42+
AWS_REMOTE_RESOURCE_REGION: str = "aws.remote.resource.region"
43+
AWS_SERVICE_TYPE: str = "aws.service.type"

0 commit comments

Comments
 (0)