Skip to content
Closed
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
47 changes: 25 additions & 22 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ ddtrace/internal/_file_queue.py @DataDog/python-guild
ddtrace/internal/_unpatched.py @DataDog/python-guild
ddtrace/internal/compat.py @DataDog/python-guild @DataDog/apm-core-python
ddtrace/internal/endpoints.py @DataDog/python-guild @DataDog/asm-python
ddtrace/settings/config.py @DataDog/python-guild @DataDog/apm-sdk-api-python
ddtrace/settings/config.py @DataDog/python-guild @DataDog/apm-sdk-capabilities-python
docs/ @DataDog/python-guild
tests/utils.py @DataDog/python-guild
tests/suitespec.yml @DataDog/python-guild @DataDog/apm-core-python
Expand Down Expand Up @@ -144,6 +144,7 @@ ddtrace/contrib/internal/botocore/services/bedrock.py @DataDog/ml-observ
ddtrace/contrib/internal/botocore/services/bedrock_agents.py @DataDog/ml-observability
ddtrace/contrib/botocore/services/bedrock.py @DataDog/ml-observability
ddtrace/contrib/internal/anthropic @DataDog/ml-observability
ddtrace/contrib/internal/google_adk @DataDog/ml-observability
ddtrace/contrib/internal/google_generativeai @DataDog/ml-observability
ddtrace/contrib/internal/google_genai @DataDog/ml-observability
ddtrace/contrib/internal/vertexai @DataDog/ml-observability
Expand All @@ -164,6 +165,7 @@ tests/contrib/botocore/test_bedrock_agents_llmobs.py @DataDog/ml-observ
tests/contrib/botocore/bedrock_utils.py @DataDog/ml-observability
tests/contrib/botocore/bedrock_cassettes @DataDog/ml-observability
tests/contrib/anthropic @DataDog/ml-observability
tests/contrib/google_adk @DataDog/ml-observability
tests/contrib/google_generativeai @DataDog/ml-observability
tests/contrib/google_genai @DataDog/ml-observability
tests/contrib/vertexai @DataDog/ml-observability
Expand All @@ -182,6 +184,7 @@ tests/snapshots/tests.contrib.openai.* @DataDog/ml-observ
tests/snapshots/tests.contrib.vertexai.* @DataDog/ml-observability
tests/snapshots/tests.contrib.botocore.test_bedrock_agents.* @DataDog/ml-observability
tests/snapshots/tests.contrib.botocore.test_bedrock.* @DataDog/ml-observability
tests/snapshots/tests.contrib.google_adk.* @DataDog/ml-observability
tests/snapshots/tests.contrib.google_generativeai.* @DataDog/ml-observability
tests/snapshots/tests.contrib.langgraph.* @DataDog/ml-observability
tests/snapshots/tests.contrib.crewai.* @DataDog/ml-observability
Expand All @@ -193,29 +196,29 @@ ddtrace/internal/remoteconfig @DataDog/remote-config @DataDog/apm-core-pyt
tests/internal/remoteconfig @DataDog/remote-config @DataDog/apm-core-python

# API SDK
ddtrace/trace/ @DataDog/apm-sdk-api-python
ddtrace/_trace/ @DataDog/apm-sdk-api-python
ddtrace/trace/ @DataDog/apm-sdk-capabilities-python
ddtrace/_trace/ @DataDog/apm-sdk-capabilities-python
# File commonly updated for integrations, widen ownership to help with PR review
ddtrace/_trace/trace_handlers.py @DataDog/apm-sdk-api-python @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/opentelemetry/ @DataDog/apm-sdk-api-python
ddtrace/internal/opentelemetry @DataDog/apm-sdk-api-python
ddtrace/opentracer/ @DataDog/apm-sdk-api-python
ddtrace/propagation/ @DataDog/apm-sdk-api-python
ddtrace/_trace/trace_handlers.py @DataDog/apm-sdk-capabilities-python @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/opentelemetry/ @DataDog/apm-sdk-capabilities-python
ddtrace/internal/opentelemetry @DataDog/apm-sdk-capabilities-python
ddtrace/opentracer/ @DataDog/apm-sdk-capabilities-python
ddtrace/propagation/ @DataDog/apm-sdk-capabilities-python

ddtrace/internal/sampling.py @DataDog/apm-sdk-api-python
ddtrace/internal/tracemethods.py @DataDog/apm-sdk-api-python
ddtrace/internal/metrics.py @DataDog/apm-sdk-api-python
ddtrace/internal/rate_limiter.py @DataDog/apm-sdk-api-python
ddtrace/runtime/ @DataDog/apm-sdk-api-python
ddtrace/internal/runtime/ @DataDog/apm-sdk-api-python
ddtrace/settings/_otel_remapper.py @DataDog/apm-sdk-api-python
tests/integration/test_priority_sampling.py @DataDog/apm-sdk-api-python
tests/integration/test_propagation.py @DataDog/apm-sdk-api-python
tests/runtime/ @DataDog/apm-sdk-api-python
tests/test_sampling.py @DataDog/apm-sdk-api-python
tests/test_tracemethods.py @DataDog/apm-sdk-api-python
tests/opentelemetry/ @DataDog/apm-sdk-api-python
tests/tracer/ @DataDog/apm-sdk-api-python
ddtrace/internal/sampling.py @DataDog/apm-sdk-capabilities-python
ddtrace/internal/tracemethods.py @DataDog/apm-sdk-capabilities-python
ddtrace/internal/metrics.py @DataDog/apm-sdk-capabilities-python
ddtrace/internal/rate_limiter.py @DataDog/apm-sdk-capabilities-python
ddtrace/runtime/ @DataDog/apm-sdk-capabilities-python
ddtrace/internal/runtime/ @DataDog/apm-sdk-capabilities-python
ddtrace/settings/_otel_remapper.py @DataDog/apm-sdk-capabilities-python
tests/integration/test_priority_sampling.py @DataDog/apm-sdk-capabilities-python
tests/integration/test_propagation.py @DataDog/apm-sdk-capabilities-python
tests/runtime/ @DataDog/apm-sdk-capabilities-python
tests/test_sampling.py @DataDog/apm-sdk-capabilities-python
tests/test_tracemethods.py @DataDog/apm-sdk-capabilities-python
tests/opentelemetry/ @DataDog/apm-sdk-capabilities-python
tests/tracer/ @DataDog/apm-sdk-capabilities-python
# Override because order matters
tests/tracer/test_ci.py @DataDog/ci-app-libraries

Expand Down
34 changes: 14 additions & 20 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
## Checklist
- [ ] PR author has checked that all the criteria below are met
- The PR description includes an overview of the change
- The PR description articulates the motivation for the change
- The change includes tests OR the PR description describes a testing strategy
- The PR description notes risks associated with the change, if any
- Newly-added code is easy to change
- The change follows the [library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
- The change includes or references documentation updates if necessary
- Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))
## Description

## Reviewer Checklist
- [ ] Reviewer has checked that all the criteria below are met
- Title is accurate
- All changes are related to the pull request's stated goal
- Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes
- Testing strategy adequately addresses listed risks
- Newly-added code is easy to change
- Release note makes sense to a user of the library
- If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment
- Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)
<!-- Provide an overview of the change and motivation for the change -->

## Testing

<!-- Describe your testing strategy or note what tests are included -->

## Risks

<!-- Note any risks associated with this change, or "None" if no risks -->

## Additional Notes

<!-- Any other information that would be helpful for reviewers -->
42 changes: 42 additions & 0 deletions .github/workflows/build_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,57 @@ on:
- cron: 0 2 * * 2-6

jobs:
compute_version:
name: Compute Library Version
runs-on: ubuntu-latest
outputs:
library_version: ${{ steps.compute-version.outputs.library_version }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
# Include all history and tags
with:
persist-credentials: false
fetch-depth: 0
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
name: Install Python
with:
python-version: '3.12'
- name: Compute Version
id: compute-version
run: |
pip install "setuptools_scm[toml]>=4"

# If we are on the main or release branch, strip away the dev version
if [[ "$GITHUB_REF_NAME" == "main" || \
"$GITHUB_REF_NAME" =~ ^[0-9]+\.[0-9]+$ || \
"$GITHUB_REF_NAME" =~ ^[0-9]+\.x$ ]]; then
LIBRARY_VERSION=$(setuptools-scm --strip-dev)
else
# All else, maintain the dev version
LIBRARY_VERSION=$(setuptools-scm)
fi

echo "${LIBRARY_VERSION}" | tee version.txt
echo "library_version=${LIBRARY_VERSION}" >> $GITHUB_OUTPUT
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: library-version
path: version.txt

build_wheels:
needs: [ "compute_version" ]
uses: ./.github/workflows/build_python_3.yml
with:
cibw_build: 'cp38* cp39* cp310* cp311* cp312* cp313*'
cibw_skip: 'cp38-win_arm64 cp39-win_arm64 cp310-win_arm64'
library_version: ${{ needs.compute_version.outputs.library_version }}

build_sdist:
needs: [ "compute_version" ]
name: Build source distribution
runs-on: ubuntu-latest
env:
SETUPTOOLS_SCM_PRETEND_VERSION_FOR_DDTRACE: ${{ needs.compute_version.outputs.library_version }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
# Include all history and tags
Expand Down
47 changes: 40 additions & 7 deletions .github/workflows/build_python_3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,39 @@ on:
cibw_prerelease_pythons:
required: false
type: string
library_version:
required: false
type: string

jobs:
compute_version:
name: Compute Library Version
runs-on: ubuntu-latest
outputs:
library_version: ${{ steps.compute-version.outputs.library_version }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
# Include all history and tags
with:
persist-credentials: false
fetch-depth: 0
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
name: Install Python
with:
python-version: '3.12'
- name: Compute Version
id: compute-version
run: |
if [ -n "${{ inputs.library_version}}" ]; then
LIBRARY_VERSION="${{ inputs.library_version}}"
else
pip install "setuptools_scm[toml]>=4"
LIBRARY_VERSION=$(setuptools-scm)
fi

echo "${LIBRARY_VERSION}"
echo "library_version=${LIBRARY_VERSION}" >> $GITHUB_OUTPUT

build-wheels-matrix:
runs-on: ubuntu-latest
outputs:
Expand All @@ -32,26 +63,27 @@ jobs:
run: |
MATRIX_INCLUDE=$(
{
cibuildwheel --print-build-identifiers --platform linux --archs x86_64,i686 | jq -cR '{only: ., os: "ubuntu-latest"}' \
&& cibuildwheel --print-build-identifiers --platform linux --archs aarch64 | jq -cR '{only: ., os: "ubuntu-24.04-arm"}' \
cibuildwheel --print-build-identifiers --platform linux --archs x86_64,i686 | jq -cR '{only: ., os: "ubuntu-latest-16-cores"}' \
&& cibuildwheel --print-build-identifiers --platform linux --archs aarch64 | jq -cR '{only: ., os: "arm-8core-linux"}' \
&& cibuildwheel --print-build-identifiers --platform windows --archs AMD64,x86 | jq -cR '{only: ., os: "windows-latest"}' \
&& cibuildwheel --print-build-identifiers --platform windows --archs ARM64 | jq -cR '{only: ., os: "windows-11-arm"}' \
&& cibuildwheel --print-build-identifiers --platform macos --archs x86_64 | jq -cR '{only: ., os: "macos-13"}' \
&& cibuildwheel --print-build-identifiers --platform macos --archs arm64 | jq -cR '{only: ., os: "macos-latest"}'
&& cibuildwheel --print-build-identifiers --platform macos --archs x86_64 | jq -cR '{only: ., os: "macos-15-large"}' \
&& cibuildwheel --print-build-identifiers --platform macos --archs arm64 | jq -cR '{only: ., os: "macos-15-xlarge"}'
} | jq -sc
)
echo $MATRIX_INCLUDE
echo "include=${MATRIX_INCLUDE}" >> $GITHUB_OUTPUT

build:
needs: build-wheels-matrix
needs: ["compute_version", "build-wheels-matrix" ]
runs-on: ${{ matrix.os }}
name: Build ${{ matrix.only }}
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.build-wheels-matrix.outputs.include) }}
env:
SETUPTOOLS_SCM_PRETEND_VERSION_FOR_DDTRACE: ${{ needs.compute_version.outputs.library_version }}
CIBW_SKIP: ${{ inputs.cibw_skip }}
CIBW_PRERELEASE_PYTHONS: ${{ inputs.cibw_prerelease_pythons }}
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
Expand All @@ -66,11 +98,12 @@ jobs:
fi
curl -sSf https://sh.rustup.rs | sh -s -- -y;
fi
CIBW_ENVIRONMENT_LINUX: PATH=$HOME/.cargo/bin:$PATH CMAKE_BUILD_PARALLEL_LEVEL=24 CMAKE_ARGS="-DNATIVE_TESTING=OFF"
CIBW_ENVIRONMENT_LINUX: PATH=$HOME/.cargo/bin:$PATH CMAKE_BUILD_PARALLEL_LEVEL=24 CMAKE_ARGS="-DNATIVE_TESTING=OFF" SETUPTOOLS_SCM_PRETEND_VERSION_FOR_DDTRACE=${{ needs.compute_version.outputs.library_version }}
# SYSTEM_VERSION_COMPAT is a workaround for versioning issue, a.k.a.
# `platform.mac_ver()` reports incorrect MacOS version at 11.0
# See: https://stackoverflow.com/a/65402241
CIBW_ENVIRONMENT_MACOS: CMAKE_BUILD_PARALLEL_LEVEL=24 SYSTEM_VERSION_COMPAT=0 CMAKE_ARGS="-DNATIVE_TESTING=OFF"
CIBW_ENVIRONMENT_MACOS: CMAKE_BUILD_PARALLEL_LEVEL=24 SYSTEM_VERSION_COMPAT=0 CMAKE_ARGS="-DNATIVE_TESTING=OFF" SETUPTOOLS_SCM_PRETEND_VERSION_FOR_DDTRACE=${{ needs.compute_version.outputs.library_version }}
CIBW_ENVIRONMENT_WINDOWS: SETUPTOOLS_SCM_PRETEND_VERSION_FOR_DDTRACE=${{ needs.compute_version.outputs.library_version }}
# cibuildwheel repair will copy anything's under /output directory from the
# build container to the host machine. This is a bit hacky way, but seems
# to be the only way getting debug symbols out from the container while
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/profiling-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ jobs:
- name: Install Valgrind
if: ${{ matrix.sanitizer == 'valgrind' }}
run: |
sudo apt update
sudo apt-get install -y valgrind

- name: Run tests with sanitizers
Expand Down
12 changes: 0 additions & 12 deletions .github/workflows/require-checklist.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/requirements-locks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"

- name: Set python interpreters
run: pyenv global 3.10 3.8 3.9 3.11 3.12 3.13
run: pyenv global 3.10 3.8 3.9 3.11 3.12 3.13 3.14.0rc1

- name: Install Dependencies
run: pip install --upgrade pip && pip install riot==0.20.1 && pip install toml==0.10.2
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/system-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
persist-credentials: false
repository: 'DataDog/system-tests'
# Automatically managed, use scripts/update-system-tests-version to update
ref: 'e13ccb562e9e060317b173e25b1e638d89f9df3b'
ref: '0eadeeae3a7c2fddb61ed55b692580ad6cd852f9'

- name: Download wheels to binaries directory
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:
persist-credentials: false
repository: 'DataDog/system-tests'
# Automatically managed, use scripts/update-system-tests-version to update
ref: 'e13ccb562e9e060317b173e25b1e638d89f9df3b'
ref: '0eadeeae3a7c2fddb61ed55b692580ad6cd852f9'

- name: Build runner
uses: ./.github/actions/install_runner
Expand Down Expand Up @@ -217,14 +217,14 @@ jobs:
if: always() && steps.docker_load.outcome == 'success' && matrix.scenario == 'appsec-1'
run: ./run.sh APPSEC_BLOCKING_FULL_DENYLIST

- name: Run APPSEC_REQUEST_BLOCKING
if: always() && steps.docker_load.outcome == 'success' && matrix.scenario == 'appsec-1'
run: ./run.sh APPSEC_REQUEST_BLOCKING

- name: Run APPSEC_RASP
if: always() && steps.docker_load.outcome == 'success' && matrix.scenario == 'appsec-1'
run: ./run.sh APPSEC_RASP

- name: Run APPSEC_STANDALONE_RASP
if: always() && steps.docker_load.outcome == 'success' && matrix.scenario == 'appsec-1'
run: ./run.sh APPSEC_STANDALONE_RASP

- name: Run DEBUGGER_PROBES_STATUS
if: always() && steps.docker_load.outcome == 'success' && matrix.scenario == 'debugger-1'
run: ./run.sh DEBUGGER_PROBES_STATUS
Expand Down Expand Up @@ -279,7 +279,7 @@ jobs:
persist-credentials: false
repository: 'DataDog/system-tests'
# Automatically managed, use scripts/update-system-tests-version to update
ref: 'e13ccb562e9e060317b173e25b1e638d89f9df3b'
ref: '0eadeeae3a7c2fddb61ed55b692580ad6cd852f9'
- name: Download wheels to binaries directory
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
Expand Down
14 changes: 11 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ variables:
DD_VPA_TEMPLATE: "vpa-template-cpu-p70-10percent-2x-oom-min-cap"
# CI_DEBUG_SERVICES: "true"
# Automatically managed, use scripts/update-system-tests-version to update
SYSTEM_TESTS_REF: "e13ccb562e9e060317b173e25b1e638d89f9df3b"
SYSTEM_TESTS_REF: "0eadeeae3a7c2fddb61ed55b692580ad6cd852f9"

default:
interruptible: true
Expand Down Expand Up @@ -75,12 +75,20 @@ run-tests-trigger:
strategy: depend

# Validate the ast-grep rule's test suite in .sg/tests
"test ast-grep rules":
"ast-grep rules":
extends: .testrunner
stage: tests
needs: []
script:
- hatch run lint:sg-test
script:
- |
echo -e "\e[0Ksection_start:`date +%s`:sg_test[collapsed=true]\r\e[0KValidate ast-grep rules"
hatch run lint:sg-test
echo -e "\e[0Ksection_end:`date +%s`:sg_test\r\e[0K"
- |
echo -e "\e[0Ksection_start:`date +%s`:sg_scan[collapsed=true]\r\e[0Kast-grep scan"
hatch run lint:sg
echo -e "\e[0Ksection_end:`date +%s`:sg_scan\r\e[0K"

microbenchmarks:
stage: benchmarks
Expand Down
Loading