Skip to content

Commit 951cded

Browse files
committed
Clean up
1 parent 62ddd58 commit 951cded

File tree

501 files changed

+18842
-4994
lines changed

Some content is hidden

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

501 files changed

+18842
-4994
lines changed

.github/CODEOWNERS

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ ddtrace/internal/_file_queue.py @DataDog/python-guild
4141
ddtrace/internal/_unpatched.py @DataDog/python-guild
4242
ddtrace/internal/compat.py @DataDog/python-guild @DataDog/apm-core-python
4343
ddtrace/internal/endpoints.py @DataDog/python-guild @DataDog/asm-python
44-
ddtrace/settings/config.py @DataDog/python-guild @DataDog/apm-sdk-api-python
44+
ddtrace/settings/config.py @DataDog/python-guild @DataDog/apm-sdk-capabilities-python
4545
docs/ @DataDog/python-guild
4646
tests/utils.py @DataDog/python-guild
4747
tests/suitespec.yml @DataDog/python-guild @DataDog/apm-core-python
@@ -144,6 +144,7 @@ ddtrace/contrib/internal/botocore/services/bedrock.py @DataDog/ml-observ
144144
ddtrace/contrib/internal/botocore/services/bedrock_agents.py @DataDog/ml-observability
145145
ddtrace/contrib/botocore/services/bedrock.py @DataDog/ml-observability
146146
ddtrace/contrib/internal/anthropic @DataDog/ml-observability
147+
ddtrace/contrib/internal/google_adk @DataDog/ml-observability
147148
ddtrace/contrib/internal/google_generativeai @DataDog/ml-observability
148149
ddtrace/contrib/internal/google_genai @DataDog/ml-observability
149150
ddtrace/contrib/internal/vertexai @DataDog/ml-observability
@@ -164,6 +165,7 @@ tests/contrib/botocore/test_bedrock_agents_llmobs.py @DataDog/ml-observ
164165
tests/contrib/botocore/bedrock_utils.py @DataDog/ml-observability
165166
tests/contrib/botocore/bedrock_cassettes @DataDog/ml-observability
166167
tests/contrib/anthropic @DataDog/ml-observability
168+
tests/contrib/google_adk @DataDog/ml-observability
167169
tests/contrib/google_generativeai @DataDog/ml-observability
168170
tests/contrib/google_genai @DataDog/ml-observability
169171
tests/contrib/vertexai @DataDog/ml-observability
@@ -182,6 +184,7 @@ tests/snapshots/tests.contrib.openai.* @DataDog/ml-observ
182184
tests/snapshots/tests.contrib.vertexai.* @DataDog/ml-observability
183185
tests/snapshots/tests.contrib.botocore.test_bedrock_agents.* @DataDog/ml-observability
184186
tests/snapshots/tests.contrib.botocore.test_bedrock.* @DataDog/ml-observability
187+
tests/snapshots/tests.contrib.google_adk.* @DataDog/ml-observability
185188
tests/snapshots/tests.contrib.google_generativeai.* @DataDog/ml-observability
186189
tests/snapshots/tests.contrib.langgraph.* @DataDog/ml-observability
187190
tests/snapshots/tests.contrib.crewai.* @DataDog/ml-observability
@@ -193,29 +196,29 @@ ddtrace/internal/remoteconfig @DataDog/remote-config @DataDog/apm-core-pyt
193196
tests/internal/remoteconfig @DataDog/remote-config @DataDog/apm-core-python
194197

195198
# API SDK
196-
ddtrace/trace/ @DataDog/apm-sdk-api-python
197-
ddtrace/_trace/ @DataDog/apm-sdk-api-python
199+
ddtrace/trace/ @DataDog/apm-sdk-capabilities-python
200+
ddtrace/_trace/ @DataDog/apm-sdk-capabilities-python
198201
# File commonly updated for integrations, widen ownership to help with PR review
199-
ddtrace/_trace/trace_handlers.py @DataDog/apm-sdk-api-python @DataDog/apm-core-python @DataDog/apm-idm-python
200-
ddtrace/opentelemetry/ @DataDog/apm-sdk-api-python
201-
ddtrace/internal/opentelemetry @DataDog/apm-sdk-api-python
202-
ddtrace/opentracer/ @DataDog/apm-sdk-api-python
203-
ddtrace/propagation/ @DataDog/apm-sdk-api-python
202+
ddtrace/_trace/trace_handlers.py @DataDog/apm-sdk-capabilities-python @DataDog/apm-core-python @DataDog/apm-idm-python
203+
ddtrace/opentelemetry/ @DataDog/apm-sdk-capabilities-python
204+
ddtrace/internal/opentelemetry @DataDog/apm-sdk-capabilities-python
205+
ddtrace/opentracer/ @DataDog/apm-sdk-capabilities-python
206+
ddtrace/propagation/ @DataDog/apm-sdk-capabilities-python
204207

205-
ddtrace/internal/sampling.py @DataDog/apm-sdk-api-python
206-
ddtrace/internal/tracemethods.py @DataDog/apm-sdk-api-python
207-
ddtrace/internal/metrics.py @DataDog/apm-sdk-api-python
208-
ddtrace/internal/rate_limiter.py @DataDog/apm-sdk-api-python
209-
ddtrace/runtime/ @DataDog/apm-sdk-api-python
210-
ddtrace/internal/runtime/ @DataDog/apm-sdk-api-python
211-
ddtrace/settings/_otel_remapper.py @DataDog/apm-sdk-api-python
212-
tests/integration/test_priority_sampling.py @DataDog/apm-sdk-api-python
213-
tests/integration/test_propagation.py @DataDog/apm-sdk-api-python
214-
tests/runtime/ @DataDog/apm-sdk-api-python
215-
tests/test_sampling.py @DataDog/apm-sdk-api-python
216-
tests/test_tracemethods.py @DataDog/apm-sdk-api-python
217-
tests/opentelemetry/ @DataDog/apm-sdk-api-python
218-
tests/tracer/ @DataDog/apm-sdk-api-python
208+
ddtrace/internal/sampling.py @DataDog/apm-sdk-capabilities-python
209+
ddtrace/internal/tracemethods.py @DataDog/apm-sdk-capabilities-python
210+
ddtrace/internal/metrics.py @DataDog/apm-sdk-capabilities-python
211+
ddtrace/internal/rate_limiter.py @DataDog/apm-sdk-capabilities-python
212+
ddtrace/runtime/ @DataDog/apm-sdk-capabilities-python
213+
ddtrace/internal/runtime/ @DataDog/apm-sdk-capabilities-python
214+
ddtrace/settings/_otel_remapper.py @DataDog/apm-sdk-capabilities-python
215+
tests/integration/test_priority_sampling.py @DataDog/apm-sdk-capabilities-python
216+
tests/integration/test_propagation.py @DataDog/apm-sdk-capabilities-python
217+
tests/runtime/ @DataDog/apm-sdk-capabilities-python
218+
tests/test_sampling.py @DataDog/apm-sdk-capabilities-python
219+
tests/test_tracemethods.py @DataDog/apm-sdk-capabilities-python
220+
tests/opentelemetry/ @DataDog/apm-sdk-capabilities-python
221+
tests/tracer/ @DataDog/apm-sdk-capabilities-python
219222
# Override because order matters
220223
tests/tracer/test_ci.py @DataDog/ci-app-libraries
221224

.github/PULL_REQUEST_TEMPLATE.md

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

12-
## Reviewer Checklist
13-
- [ ] Reviewer has checked that all the criteria below are met
14-
- Title is accurate
15-
- All changes are related to the pull request's stated goal
16-
- Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes
17-
- Testing strategy adequately addresses listed risks
18-
- Newly-added code is easy to change
19-
- Release note makes sense to a user of the library
20-
- If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment
21-
- 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)
3+
<!-- Provide an overview of the change and motivation for the change -->
4+
5+
## Testing
6+
7+
<!-- Describe your testing strategy or note what tests are included -->
8+
9+
## Risks
10+
11+
<!-- Note any risks associated with this change, or "None" if no risks -->
12+
13+
## Additional Notes
14+
15+
<!-- Any other information that would be helpful for reviewers -->

.github/workflows/build_deploy.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,57 @@ on:
2424
- cron: 0 2 * * 2-6
2525

2626
jobs:
27+
compute_version:
28+
name: Compute Library Version
29+
runs-on: ubuntu-latest
30+
outputs:
31+
library_version: ${{ steps.compute-version.outputs.library_version }}
32+
steps:
33+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
34+
# Include all history and tags
35+
with:
36+
persist-credentials: false
37+
fetch-depth: 0
38+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
39+
name: Install Python
40+
with:
41+
python-version: '3.12'
42+
- name: Compute Version
43+
id: compute-version
44+
run: |
45+
pip install "setuptools_scm[toml]>=4"
46+
47+
# If we are on the main or release branch, strip away the dev version
48+
if [[ "$GITHUB_REF_NAME" == "main" || \
49+
"$GITHUB_REF_NAME" =~ ^[0-9]+\.[0-9]+$ || \
50+
"$GITHUB_REF_NAME" =~ ^[0-9]+\.x$ ]]; then
51+
LIBRARY_VERSION=$(setuptools-scm --strip-dev)
52+
else
53+
# All else, maintain the dev version
54+
LIBRARY_VERSION=$(setuptools-scm)
55+
fi
56+
57+
echo "${LIBRARY_VERSION}" | tee version.txt
58+
echo "library_version=${LIBRARY_VERSION}" >> $GITHUB_OUTPUT
59+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
60+
with:
61+
name: library-version
62+
path: version.txt
63+
2764
build_wheels:
65+
needs: [ "compute_version" ]
2866
uses: ./.github/workflows/build_python_3.yml
2967
with:
3068
cibw_build: 'cp38* cp39* cp310* cp311* cp312* cp313*'
3169
cibw_skip: 'cp38-win_arm64 cp39-win_arm64 cp310-win_arm64'
70+
library_version: ${{ needs.compute_version.outputs.library_version }}
3271

3372
build_sdist:
73+
needs: [ "compute_version" ]
3474
name: Build source distribution
3575
runs-on: ubuntu-latest
76+
env:
77+
SETUPTOOLS_SCM_PRETEND_VERSION_FOR_DDTRACE: ${{ needs.compute_version.outputs.library_version }}
3678
steps:
3779
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3880
# Include all history and tags

.github/workflows/build_python_3.yml

Lines changed: 40 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,39 @@ on:
1212
cibw_prerelease_pythons:
1313
required: false
1414
type: string
15+
library_version:
16+
required: false
17+
type: string
1518

1619
jobs:
20+
compute_version:
21+
name: Compute Library Version
22+
runs-on: ubuntu-latest
23+
outputs:
24+
library_version: ${{ steps.compute-version.outputs.library_version }}
25+
steps:
26+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
27+
# Include all history and tags
28+
with:
29+
persist-credentials: false
30+
fetch-depth: 0
31+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
32+
name: Install Python
33+
with:
34+
python-version: '3.12'
35+
- name: Compute Version
36+
id: compute-version
37+
run: |
38+
if [ -n "${{ inputs.library_version}}" ]; then
39+
LIBRARY_VERSION="${{ inputs.library_version}}"
40+
else
41+
pip install "setuptools_scm[toml]>=4"
42+
LIBRARY_VERSION=$(setuptools-scm)
43+
fi
44+
45+
echo "${LIBRARY_VERSION}"
46+
echo "library_version=${LIBRARY_VERSION}" >> $GITHUB_OUTPUT
47+
1748
build-wheels-matrix:
1849
runs-on: ubuntu-latest
1950
outputs:
@@ -32,26 +63,27 @@ jobs:
3263
run: |
3364
MATRIX_INCLUDE=$(
3465
{
35-
cibuildwheel --print-build-identifiers --platform linux --archs x86_64,i686 | jq -cR '{only: ., os: "ubuntu-latest"}' \
36-
&& cibuildwheel --print-build-identifiers --platform linux --archs aarch64 | jq -cR '{only: ., os: "ubuntu-24.04-arm"}' \
66+
cibuildwheel --print-build-identifiers --platform linux --archs x86_64,i686 | jq -cR '{only: ., os: "ubuntu-latest-16-cores"}' \
67+
&& cibuildwheel --print-build-identifiers --platform linux --archs aarch64 | jq -cR '{only: ., os: "arm-8core-linux"}' \
3768
&& cibuildwheel --print-build-identifiers --platform windows --archs AMD64,x86 | jq -cR '{only: ., os: "windows-latest"}' \
3869
&& cibuildwheel --print-build-identifiers --platform windows --archs ARM64 | jq -cR '{only: ., os: "windows-11-arm"}' \
39-
&& cibuildwheel --print-build-identifiers --platform macos --archs x86_64 | jq -cR '{only: ., os: "macos-13"}' \
40-
&& cibuildwheel --print-build-identifiers --platform macos --archs arm64 | jq -cR '{only: ., os: "macos-latest"}'
70+
&& cibuildwheel --print-build-identifiers --platform macos --archs x86_64 | jq -cR '{only: ., os: "macos-15-large"}' \
71+
&& cibuildwheel --print-build-identifiers --platform macos --archs arm64 | jq -cR '{only: ., os: "macos-15-xlarge"}'
4172
} | jq -sc
4273
)
4374
echo $MATRIX_INCLUDE
4475
echo "include=${MATRIX_INCLUDE}" >> $GITHUB_OUTPUT
4576
4677
build:
47-
needs: build-wheels-matrix
78+
needs: ["compute_version", "build-wheels-matrix" ]
4879
runs-on: ${{ matrix.os }}
4980
name: Build ${{ matrix.only }}
5081
strategy:
5182
fail-fast: false
5283
matrix:
5384
include: ${{ fromJson(needs.build-wheels-matrix.outputs.include) }}
5485
env:
86+
SETUPTOOLS_SCM_PRETEND_VERSION_FOR_DDTRACE: ${{ needs.compute_version.outputs.library_version }}
5587
CIBW_SKIP: ${{ inputs.cibw_skip }}
5688
CIBW_PRERELEASE_PYTHONS: ${{ inputs.cibw_prerelease_pythons }}
5789
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
@@ -66,11 +98,12 @@ jobs:
6698
fi
6799
curl -sSf https://sh.rustup.rs | sh -s -- -y;
68100
fi
69-
CIBW_ENVIRONMENT_LINUX: PATH=$HOME/.cargo/bin:$PATH CMAKE_BUILD_PARALLEL_LEVEL=24 CMAKE_ARGS="-DNATIVE_TESTING=OFF"
101+
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 }}
70102
# SYSTEM_VERSION_COMPAT is a workaround for versioning issue, a.k.a.
71103
# `platform.mac_ver()` reports incorrect MacOS version at 11.0
72104
# See: https://stackoverflow.com/a/65402241
73-
CIBW_ENVIRONMENT_MACOS: CMAKE_BUILD_PARALLEL_LEVEL=24 SYSTEM_VERSION_COMPAT=0 CMAKE_ARGS="-DNATIVE_TESTING=OFF"
105+
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 }}
106+
CIBW_ENVIRONMENT_WINDOWS: SETUPTOOLS_SCM_PRETEND_VERSION_FOR_DDTRACE=${{ needs.compute_version.outputs.library_version }}
74107
# cibuildwheel repair will copy anything's under /output directory from the
75108
# build container to the host machine. This is a bit hacky way, but seems
76109
# to be the only way getting debug symbols out from the container while

.github/workflows/profiling-native.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ jobs:
4141
- name: Install Valgrind
4242
if: ${{ matrix.sanitizer == 'valgrind' }}
4343
run: |
44+
sudo apt update
4445
sudo apt-get install -y valgrind
4546
4647
- name: Run tests with sanitizers

.github/workflows/require-checklist.yaml

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

.github/workflows/requirements-locks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
2626

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

3030
- name: Install Dependencies
3131
run: pip install --upgrade pip && pip install riot==0.20.1 && pip install toml==0.10.2

.github/workflows/system-tests.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
persist-credentials: false
4848
repository: 'DataDog/system-tests'
4949
# Automatically managed, use scripts/update-system-tests-version to update
50-
ref: 'e13ccb562e9e060317b173e25b1e638d89f9df3b'
50+
ref: '0eadeeae3a7c2fddb61ed55b692580ad6cd852f9'
5151

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

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

220-
- name: Run APPSEC_REQUEST_BLOCKING
221-
if: always() && steps.docker_load.outcome == 'success' && matrix.scenario == 'appsec-1'
222-
run: ./run.sh APPSEC_REQUEST_BLOCKING
223-
224220
- name: Run APPSEC_RASP
225221
if: always() && steps.docker_load.outcome == 'success' && matrix.scenario == 'appsec-1'
226222
run: ./run.sh APPSEC_RASP
227223

224+
- name: Run APPSEC_STANDALONE_RASP
225+
if: always() && steps.docker_load.outcome == 'success' && matrix.scenario == 'appsec-1'
226+
run: ./run.sh APPSEC_STANDALONE_RASP
227+
228228
- name: Run DEBUGGER_PROBES_STATUS
229229
if: always() && steps.docker_load.outcome == 'success' && matrix.scenario == 'debugger-1'
230230
run: ./run.sh DEBUGGER_PROBES_STATUS
@@ -279,7 +279,7 @@ jobs:
279279
persist-credentials: false
280280
repository: 'DataDog/system-tests'
281281
# Automatically managed, use scripts/update-system-tests-version to update
282-
ref: 'e13ccb562e9e060317b173e25b1e638d89f9df3b'
282+
ref: '0eadeeae3a7c2fddb61ed55b692580ad6cd852f9'
283283
- name: Download wheels to binaries directory
284284
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
285285
with:

.gitlab-ci.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ variables:
1414
DD_VPA_TEMPLATE: "vpa-template-cpu-p70-10percent-2x-oom-min-cap"
1515
# CI_DEBUG_SERVICES: "true"
1616
# Automatically managed, use scripts/update-system-tests-version to update
17-
SYSTEM_TESTS_REF: "e13ccb562e9e060317b173e25b1e638d89f9df3b"
17+
SYSTEM_TESTS_REF: "0eadeeae3a7c2fddb61ed55b692580ad6cd852f9"
1818

1919
default:
2020
interruptible: true
@@ -75,12 +75,20 @@ run-tests-trigger:
7575
strategy: depend
7676

7777
# Validate the ast-grep rule's test suite in .sg/tests
78-
"test ast-grep rules":
78+
"ast-grep rules":
7979
extends: .testrunner
8080
stage: tests
8181
needs: []
8282
script:
83-
- hatch run lint:sg-test
83+
script:
84+
- |
85+
echo -e "\e[0Ksection_start:`date +%s`:sg_test[collapsed=true]\r\e[0KValidate ast-grep rules"
86+
hatch run lint:sg-test
87+
echo -e "\e[0Ksection_end:`date +%s`:sg_test\r\e[0K"
88+
- |
89+
echo -e "\e[0Ksection_start:`date +%s`:sg_scan[collapsed=true]\r\e[0Kast-grep scan"
90+
hatch run lint:sg
91+
echo -e "\e[0Ksection_end:`date +%s`:sg_scan\r\e[0K"
8492
8593
microbenchmarks:
8694
stage: benchmarks

0 commit comments

Comments
 (0)