Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
strategy:
max-parallel: 4
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14', '3.15']

steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_layer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
fail-fast: false
matrix:
arch: [arm64, amd64]
python_version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
python_version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]

steps:
- name: Checkout
Expand Down
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ ARG runtime
RUN mkdir -p /build/python/lib/$runtime/site-packages
WORKDIR /build

# Install newer version of GCC on AL2
# AL2 SAM images (Python <= 3.11) ship GCC 7, which is too old to build ddtrace.
# AL2023 SAM images already include GCC, find, and strip. The Lambda Python 3.15
# preview image does not, so install that toolchain with dnf.
RUN set -eux; \
if command -v yum >/dev/null 2>&1; then \
yum -y install git gcc10 gcc10-c++; \
Expand All @@ -16,6 +18,9 @@ RUN set -eux; \
rm g++ && ln -s gcc10-g++ g++; \
rm cc && ln -s gcc10-cc cc; \
rm c++ && ln -s gcc10-c++ c++; \
elif ! command -v gcc >/dev/null 2>&1 || ! command -v strip >/dev/null 2>&1 || ! command -v find >/dev/null 2>&1; then \
dnf install -y gcc gcc-c++ make binutils findutils git; \
dnf clean all; \
fi

# Add Rust compiler which is needed to build dd-trace-py from source
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[![Slack](https://chat.datadoghq.com/badge.svg?bg=632CA6)](https://chat.datadoghq.com/)
[![License](https://img.shields.io/badge/license-Apache--2.0-blue)](https://github.com/DataDog/datadog-lambda-python/blob/main/LICENSE)

Datadog Lambda Library for Python (3.8, 3.9, 3.10, 3.11, 3.12, 3.13, and 3.14) enables [enhanced Lambda metrics](https://docs.datadoghq.com/serverless/enhanced_lambda_metrics), [distributed tracing](https://docs.datadoghq.com/serverless/distributed_tracing), and [custom metric submission](https://docs.datadoghq.com/serverless/custom_metrics) from AWS Lambda functions.
Datadog Lambda Library for Python (3.8, 3.9, 3.10, 3.11, 3.12, 3.13, and 3.14, 3.15) enables [enhanced Lambda metrics](https://docs.datadoghq.com/serverless/enhanced_lambda_metrics), [distributed tracing](https://docs.datadoghq.com/serverless/distributed_tracing), and [custom metric submission](https://docs.datadoghq.com/serverless/custom_metrics) from AWS Lambda functions.

## Installation

Expand Down
8 changes: 8 additions & 0 deletions ci/datasources/runtimes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,11 @@ runtimes:
python_version: "3.14"
arch: "arm64"
image: "3.14.0"
- name: "python315"
python_version: "3.15"
arch: "amd64"
image: "3.15.0"
- name: "python315"
python_version: "3.15"
arch: "arm64"
image: "3.15.0"
10 changes: 9 additions & 1 deletion ci/publish_layers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ AWS_CLI_PYTHON_VERSIONS=(
"python3.13"
"python3.14"
"python3.14"
"python3.15"
"python3.15"
)
PYTHON_VERSIONS=(
"3.8-amd64"
Expand All @@ -41,6 +43,8 @@ PYTHON_VERSIONS=(
"3.13-arm64"
"3.14-amd64"
"3.14-arm64"
"3.15-amd64"
"3.15-arm64"
)
LAYER_PATHS=(
".layers/datadog_lambda_py-amd64-3.8.zip"
Expand All @@ -57,6 +61,8 @@ LAYER_PATHS=(
".layers/datadog_lambda_py-arm64-3.13.zip"
".layers/datadog_lambda_py-amd64-3.14.zip"
".layers/datadog_lambda_py-arm64-3.14.zip"
".layers/datadog_lambda_py-amd64-3.15.zip"
".layers/datadog_lambda_py-arm64-3.15.zip"
)
LAYERS=(
"Datadog-Python38"
Expand All @@ -72,7 +78,9 @@ LAYERS=(
"Datadog-Python313"
"Datadog-Python313-ARM"
"Datadog-Python314"
"Datadog-Python314-ARM"
"Datadog-Python314-ARM"
"Datadog-Python315"
"Datadog-Python315-ARM"
)
STAGES=('prod', 'sandbox', 'staging', 'gov-staging', 'gov-prod')

Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ classifiers = [
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.15",
]

[tool.poetry.dependencies]
python = ">=3.8.0,<3.15"
python = ">=3.8.0,<3.16"
datadog = ">=0.51.0,<1.0.0"
wrapt = ">=1.11.2,!=2.2.0,<3"
ddtrace = [
Expand Down
4 changes: 4 additions & 0 deletions scripts/add_new_region.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ LAYER_NAMES=(
"Datadog-Python313-ARM"
"Datadog-Python314"
"Datadog-Python314-ARM"
"Datadog-Python315"
"Datadog-Python315-ARM"
)
PYTHON_VERSIONS_FOR_AWS_CLI=(
"python3.8"
Expand All @@ -43,6 +45,8 @@ PYTHON_VERSIONS_FOR_AWS_CLI=(
"python3.13"
"python3.14"
"python3.14"
"python3.15"
"python3.15"
)
NEW_REGION=$1

Expand Down
12 changes: 10 additions & 2 deletions scripts/build_layers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ set -e

LAYER_DIR=".layers"
LAYER_FILES_PREFIX="datadog_lambda_py"
AVAILABLE_PYTHON_VERSIONS=("3.8" "3.9" "3.10" "3.11" "3.12" "3.13" "3.14")
AVAILABLE_PYTHON_VERSIONS=("3.8" "3.9" "3.10" "3.11" "3.12" "3.13" "3.14" "3.15")
AVAILABLE_ARCHS=("arm64" "amd64")

if [ -n "$ARCH" ]; then
Expand Down Expand Up @@ -103,11 +103,19 @@ function docker_build_zip {

destination=$(make_path_absolute $2)
arch=$3
# Python 3.15 is a Lambda preview runtime. AWS has not published
# public.ecr.aws/sam/build-python3.15, so use the preview base image.
# The Dockerfile installs the compiler toolchain that image is missing.
if [ "$1" = "3.15" ]; then
image="public.ecr.aws/lambda/python:3.15-preview"
else
image="public.ecr.aws/sam/build-python$1:1"
fi
# Install datadogpy in a docker container to avoid the mess from switching
# between different python runtimes.
temp_dir=$(mktemp -d)
docker buildx build -t datadog-lambda-python-${arch}:$1 . --no-cache \
--build-arg image=public.ecr.aws/sam/build-python$1:1 \
--build-arg image="${image}" \
--build-arg runtime=python$1 \
--platform linux/${arch} \
--progress=plain \
Expand Down
2 changes: 2 additions & 0 deletions scripts/list_layers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ LAYER_NAMES=(
"Datadog-Python313-ARM"
"Datadog-Python314"
"Datadog-Python314-ARM"
"Datadog-Python315"
"Datadog-Python315-ARM"
)
AVAILABLE_REGIONS=$(aws ec2 describe-regions | jq -r '.[] | .[] | .RegionName')
LAYERS_MISSING_REGIONS=()
Expand Down
2 changes: 1 addition & 1 deletion scripts/publish_govcloud.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ do

export REGION=$region

for python_version in "3.8" "3.9" "3.10" "3.11" "3.12" "3.13" "3.14"; do
for python_version in "3.8" "3.9" "3.10" "3.11" "3.12" "3.13" "3.14" "3.15"; do
for arch in "amd64" "arm64"; do
export PYTHON_VERSION=$python_version
export ARCH=$arch
Expand Down
8 changes: 7 additions & 1 deletion scripts/publish_layers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ PYTHON_VERSIONS_FOR_AWS_CLI=(
"python3.13"
"python3.14"
"python3.14"
"python3.15"
"python3.15"
)
LAYER_PATHS=(
".layers/datadog_lambda_py-amd64-3.8.zip"
Expand All @@ -44,6 +46,8 @@ LAYER_PATHS=(
".layers/datadog_lambda_py-arm64-3.13.zip"
".layers/datadog_lambda_py-amd64-3.14.zip"
".layers/datadog_lambda_py-arm64-3.14.zip"
".layers/datadog_lambda_py-amd64-3.15.zip"
".layers/datadog_lambda_py-arm64-3.15.zip"
)
AVAILABLE_LAYERS=(
"Datadog-Python38"
Expand All @@ -59,7 +63,9 @@ AVAILABLE_LAYERS=(
"Datadog-Python313"
"Datadog-Python313-ARM"
"Datadog-Python314"
"Datadog-Python314-ARM"
"Datadog-Python314-ARM"
"Datadog-Python315"
"Datadog-Python315-ARM"
)
AVAILABLE_REGIONS=$(aws ec2 describe-regions | jq -r '.[] | .[] | .RegionName')

Expand Down
7 changes: 5 additions & 2 deletions scripts/run_integration_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ python311=("python3.11" "3.11" $(xxd -l 4 -c 4 -p < /dev/random))
python312=("python3.12" "3.12" $(xxd -l 4 -c 4 -p < /dev/random))
python313=("python3.13" "3.13" $(xxd -l 4 -c 4 -p < /dev/random))
python314=("python3.14" "3.14" $(xxd -l 4 -c 4 -p < /dev/random))
python315=("python3.15" "3.15" $(xxd -l 4 -c 4 -p < /dev/random))

PARAMETERS_SETS=("python38" "python39" "python310" "python311" "python312" "python313" "python314")
PARAMETERS_SETS=("python38" "python39" "python310" "python311" "python312" "python313" "python314" "python315")

if [ -z "$RUNTIME_PARAM" ]; then
echo "Python version not specified, running for all python versions."
Expand Down Expand Up @@ -255,7 +256,9 @@ for handler_name in "${LAMBDA_HANDLERS[@]}"; do
# Parse out account ID in ARN
sed -E "s/([a-zA-Z0-9]+):([a-zA-Z0-9]+):([a-zA-Z0-9]+):([a-zA-Z0-9\-]+):([a-zA-Z0-9\-\:]+)/\1:\2:\3:\4:XXXX:\4/g" |
sed -E "/init complete at epoch/d" |
sed -E "/main started at epoch/d"
sed -E "/main started at epoch/d" |
# Lambda preview runtimes log the TLS profile name, which is not stable across invocations
sed '/\[tls-profile\]/d'
)

if [ ! -f $function_snapshot_path ]; then
Expand Down
2 changes: 1 addition & 1 deletion scripts/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# Run unit tests in Docker
set -e

PYTHON_VERSIONS=("3.8" "3.9" "3.10" "3.11" "3.12" "3.13" "3.14")
PYTHON_VERSIONS=("3.8" "3.9" "3.10" "3.11" "3.12" "3.13" "3.14" "3.15")

for python_version in "${PYTHON_VERSIONS[@]}"
do
Expand Down
2 changes: 2 additions & 0 deletions scripts/sign_layers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ LAYER_FILES=(
"datadog_lambda_py-arm64-3.13.zip"
"datadog_lambda_py-amd64-3.14.zip"
"datadog_lambda_py-arm64-3.14.zip"
"datadog_lambda_py-amd64-3.15.zip"
"datadog_lambda_py-arm64-3.15.zip"
)
SIGNING_PROFILE_NAME="DatadogLambdaSigningProfile"

Expand Down
Loading
Loading