Skip to content

Commit b83864a

Browse files
committed
Merge remote-tracking branch 'origin/main' into munir/remove-tornado-stuff
2 parents 951e12a + 441fc1c commit b83864a

File tree

430 files changed

+7773
-2988
lines changed

Some content is hidden

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

430 files changed

+7773
-2988
lines changed

.claude/CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ This project has custom skills that provide specialized workflows. **Always chec
2323
**Use whenever:** Formatting code, validating style/types/security, or before committing changes.
2424

2525
**Purpose:** Runs targeted linting and code quality checks using `hatch run lint:*`:
26-
- Formats code with Black and Ruff auto-fixes
26+
- Formats code with `ruff check` and `ruff format`
2727
- Validates style, types, and security
2828
- Checks spelling and documentation
2929
- Validates test infrastructure (suitespec, riotfile, etc.)

.claude/skills/lint/SKILL.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ hatch run lint:typing -- path/to/file.py
4848
### Code Formatting
4949

5050
#### `fmt` - Format code (recommended for most edits)
51-
Formats and validates code style using Black and Ruff.
51+
Formats and validates code style using Ruff.
5252

5353
**Usage:**
5454
```bash
@@ -63,7 +63,7 @@ hatch run lint:fmt -- ddtrace/contrib/flask/
6363
```
6464

6565
**What it does:**
66-
1. Runs Black formatter
66+
1. Runs the Ruff formatter
6767
2. Runs Ruff with --fix to auto-fix issues
6868
3. Re-validates with style checks
6969

@@ -94,20 +94,21 @@ hatch run lint:style -- ddtrace/
9494
```
9595

9696
**What it validates:**
97-
- Black formatting
97+
- Ruff formatting
9898
- Ruff linting rules
9999
- Cython linting
100100
- C code formatting
101101
- CMake formatting
102102

103103
**When to use:** To verify style compliance before committing without auto-fixes.
104104

105-
#### `black_check` - Check Black formatting
106-
Validates Python code formatting with Black (no auto-fix).
105+
#### `format_check` - Check formatting
106+
107+
Validates Python code formatting with `ruff format` (no auto-fix).
107108

108109
**Usage:**
109110
```bash
110-
hatch run lint:black_check -- ddtrace/tracer.py
111+
hatch run lint:format_check -- ddtrace/tracer.py
111112
```
112113

113114
**When to use:** Quick check of Python formatting before committing.

.github/workflows/build_deploy.yml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -111,17 +111,6 @@ jobs:
111111
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
112112
with:
113113
persist-credentials: false
114-
115-
- name: Enable sccache
116-
uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # 0.0.9
117-
118-
- name: Add addtional GHA cache-related env vars
119-
uses: actions/github-script@v7
120-
with:
121-
script: |
122-
core.exportVariable('ACTIONS_CACHE_URL', process.env['ACTIONS_CACHE_URL'])
123-
core.exportVariable('ACTIONS_RUNTIME_URL', process.env['ACTIONS_RUNTIME_URL'])
124-
125114
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
126115
with:
127116
name: source-dist
@@ -139,10 +128,6 @@ jobs:
139128
- name: Install source package
140129
env:
141130
CMAKE_BUILD_PARALLEL_LEVEL: 12
142-
CARGO_BUILD_JOBS: 12
143-
SCCACHE_GHA_ENABLED: true
144-
SCCACHE_CACHE_SIZE: 1G
145-
DD_USE_SCCACHE: 1
146131
run: pip install dist/*.tar.gz
147132

148133
- name: Test the source package

.github/workflows/build_python_3.yml

Lines changed: 41 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -83,26 +83,52 @@ jobs:
8383
fail-fast: false
8484
matrix:
8585
include: ${{ fromJson(needs.build-wheels-matrix.outputs.include) }}
86+
env:
87+
SETUPTOOLS_SCM_PRETEND_VERSION_FOR_DDTRACE: ${{ needs.compute_version.outputs.library_version }}
88+
CIBW_SKIP: ${{ inputs.cibw_skip }}
89+
CIBW_PRERELEASE_PYTHONS: ${{ inputs.cibw_prerelease_pythons }}
90+
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
91+
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux2014
92+
CIBW_MUSLLINUX_I686_IMAGE: ghcr.io/datadog/dd-trace-py/pypa_musllinux_1_2_i686:latest
93+
CIBW_BEFORE_ALL_WINDOWS: ${{ matrix.os == 'windows-latest' && 'rustup target add i686-pc-windows-msvc' || (matrix.os == 'windows-11-arm' && 'rustup target add aarch64-pc-windows-msvc') }}
94+
CIBW_BEFORE_ALL_MACOS: rustup target add aarch64-apple-darwin
95+
CIBW_BEFORE_ALL_LINUX: |
96+
if [[ "$(uname -m)-$(uname -i)-$(uname -o | tr '[:upper:]' '[:lower:]')-$(ldd --version 2>&1 | head -n 1 | awk '{print $1}')" != "i686-unknown-linux-musl" ]]; then
97+
curl -sSf https://sh.rustup.rs | sh -s -- -y;
98+
fi
99+
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 }}
100+
# SYSTEM_VERSION_COMPAT is a workaround for versioning issue, a.k.a.
101+
# `platform.mac_ver()` reports incorrect MacOS version at 11.0
102+
# See: https://stackoverflow.com/a/65402241
103+
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 }}
104+
CIBW_ENVIRONMENT_WINDOWS: SETUPTOOLS_SCM_PRETEND_VERSION_FOR_DDTRACE=${{ needs.compute_version.outputs.library_version }}
105+
# cibuildwheel repair will copy anything's under /output directory from the
106+
# build container to the host machine. This is a bit hacky way, but seems
107+
# to be the only way getting debug symbols out from the container while
108+
# we don't mess up with RECORD file.
109+
CIBW_REPAIR_WHEEL_COMMAND_LINUX: |
110+
mkdir -p /output/debugwheelhouse &&
111+
python scripts/extract_debug_symbols.py {wheel} --output-dir /output/debugwheelhouse &&
112+
python scripts/zip_filter.py {wheel} \*.c \*.cpp \*.cc \*.h \*.hpp \*.pyx \*.md &&
113+
mkdir ./tempwheelhouse &&
114+
unzip -l {wheel} | grep '\.so' &&
115+
auditwheel repair -w ./tempwheelhouse {wheel} &&
116+
mv ./tempwheelhouse/*.whl {dest_dir} &&
117+
rm -rf ./tempwheelhouse
118+
CIBW_REPAIR_WHEEL_COMMAND_MACOS: |
119+
mkdir -p ./debugwheelhouse &&
120+
python scripts/extract_debug_symbols.py {wheel} --output-dir ./debugwheelhouse &&
121+
python scripts/zip_filter.py {wheel} \*.c \*.cpp \*.cc \*.h \*.hpp \*.pyx \*.md &&
122+
MACOSX_DEPLOYMENT_TARGET=12.7 delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}
123+
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: python scripts/zip_filter.py "{wheel}" "*.c" "*.cpp" "*.cc" "*.h" "*.hpp" "*.pyx" "*.md" && mv "{wheel}" "{dest_dir}"
124+
CIBW_TEST_COMMAND: "python {project}/tests/smoke_test.py"
125+
86126
steps:
87127
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
88128
with:
89129
persist-credentials: false
90130
fetch-depth: 0
91131

92-
- name: Enable sccache
93-
if: runner.os != 'Windows'
94-
uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # 0.0.9
95-
with:
96-
disable_annotations: true
97-
98-
- name: Add addtional GHA cache-related env vars
99-
uses: actions/github-script@v7
100-
if: runner.os != 'Windows'
101-
with:
102-
script: |
103-
core.exportVariable('ACTIONS_CACHE_URL', process.env['ACTIONS_CACHE_URL'])
104-
core.exportVariable('ACTIONS_RUNTIME_URL', process.env['ACTIONS_RUNTIME_URL'])
105-
106132
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
107133
name: Install Python
108134
with:
@@ -118,76 +144,7 @@ jobs:
118144
uses: pypa/cibuildwheel@c923d83ad9c1bc00211c5041d0c3f73294ff88f6 # v3.1.4
119145
with:
120146
only: ${{ matrix.only }}
121-
env:
122-
SETUPTOOLS_SCM_PRETEND_VERSION_FOR_DDTRACE: ${{ needs.compute_version.outputs.library_version }}
123-
CIBW_SKIP: ${{ inputs.cibw_skip }}
124-
CIBW_PRERELEASE_PYTHONS: ${{ inputs.cibw_prerelease_pythons }}
125-
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
126-
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux2014
127-
CIBW_MUSLLINUX_I686_IMAGE: ghcr.io/datadog/dd-trace-py/pypa_musllinux_1_2_i686:latest
128-
CIBW_BEFORE_ALL_WINDOWS: ${{ matrix.os == 'windows-latest' && 'rustup target add i686-pc-windows-msvc' || (matrix.os == 'windows-11-arm' && 'rustup target add aarch64-pc-windows-msvc') }}
129-
CIBW_BEFORE_ALL_MACOS: rustup target add aarch64-apple-darwin
130-
CIBW_BEFORE_ALL_LINUX: |
131-
if [[ "$(uname -m)-$(uname -i)-$(uname -o | tr '[:upper:]' '[:lower:]')-$(ldd --version 2>&1 | head -n 1 | awk '{print $1}')" != "i686-unknown-linux-musl" ]]; then
132-
curl -sSf https://sh.rustup.rs | sh -s -- -y;
133-
fi
134-
CIBW_ENVIRONMENT_LINUX: >
135-
PATH=$HOME/.cargo/bin:$PATH
136-
CARGO_BUILD_JOBS=24
137-
CMAKE_BUILD_PARALLEL_LEVEL=24
138-
CMAKE_ARGS="-DNATIVE_TESTING=OFF"
139-
SETUPTOOLS_SCM_PRETEND_VERSION_FOR_DDTRACE=${{ needs.compute_version.outputs.library_version }}
140-
SCCACHE_GHA_ENABLED=true
141-
SCCACHE_DIR=/host/${{ env.SCCACHE_DIR }}
142-
SCCACHE_PATH=/host/${{ env.SCCACHE_PATH }}
143-
SCCACHE_CACHE_SIZE=1G
144-
ACTIONS_RUNTIME_TOKEN=${{ env.ACTIONS_RUNTIME_TOKEN }}
145-
ACTIONS_RUNTIME_URL=${{ env.ACTIONS_RUNTIME_URL }}
146-
ACTIONS_RESULTS_URL=${{ env.ACTIONS_RESULTS_URL }}
147-
ACTIONS_CACHE_URL=${{ env.ACTIONS_CACHE_URL }}
148-
ACTIONS_CACHE_SERVICE_V2=${{ env.ACTIONS_CACHE_SERVICE_V2 }}
149-
DD_USE_SCCACHE=1
150-
# SYSTEM_VERSION_COMPAT is a workaround for versioning issue, a.k.a.
151-
# `platform.mac_ver()` reports incorrect MacOS version at 11.0
152-
# See: https://stackoverflow.com/a/65402241
153-
CIBW_ENVIRONMENT_MACOS: >
154-
CMAKE_BUILD_PARALLEL_LEVEL=24
155-
CARGO_BUILD_JOBS=24
156-
SYSTEM_VERSION_COMPAT=0
157-
CMAKE_ARGS="-DNATIVE_TESTING=OFF"
158-
SETUPTOOLS_SCM_PRETEND_VERSION_FOR_DDTRACE=${{ needs.compute_version.outputs.library_version }}
159-
SCCACHE_GHA_ENABLED=true
160-
SCCACHE_CACHE_SIZE=1G
161-
ACTIONS_RUNTIME_TOKEN=${{ env.ACTIONS_RUNTIME_TOKEN }}
162-
ACTIONS_RUNTIME_URL=${{ env.ACTIONS_RUNTIME_URL }}
163-
ACTIONS_RESULTS_URL=${{ env.ACTIONS_RESULTS_URL }}
164-
ACTIONS_CACHE_URL=${{ env.ACTIONS_CACHE_URL }}
165-
ACTIONS_CACHE_SERVICE_V2=${{ env.ACTIONS_CACHE_SERVICE_V2 }}
166-
DD_USE_SCCACHE=1
167-
CIBW_ENVIRONMENT_WINDOWS: >
168-
SETUPTOOLS_SCM_PRETEND_VERSION_FOR_DDTRACE=${{ needs.compute_version.outputs.library_version }}
169-
# cibuildwheel repair will copy anything's under /output directory from the
170-
# build container to the host machine. This is a bit hacky way, but seems
171-
# to be the only way getting debug symbols out from the container while
172-
# we don't mess up with RECORD file.
173-
CIBW_REPAIR_WHEEL_COMMAND_LINUX: |
174-
mkdir -p /output/debugwheelhouse &&
175-
python scripts/extract_debug_symbols.py {wheel} --output-dir /output/debugwheelhouse &&
176-
python scripts/zip_filter.py {wheel} \*.c \*.cpp \*.cc \*.h \*.hpp \*.pyx \*.md &&
177-
mkdir ./tempwheelhouse &&
178-
unzip -l {wheel} | grep '\.so' &&
179-
auditwheel repair -w ./tempwheelhouse {wheel} &&
180-
mv ./tempwheelhouse/*.whl {dest_dir} &&
181-
rm -rf ./tempwheelhouse
182-
CIBW_REPAIR_WHEEL_COMMAND_MACOS: |
183-
mkdir -p ./debugwheelhouse &&
184-
python scripts/extract_debug_symbols.py {wheel} --output-dir ./debugwheelhouse &&
185-
python scripts/zip_filter.py {wheel} \*.c \*.cpp \*.cc \*.h \*.hpp \*.pyx \*.md &&
186-
MACOSX_DEPLOYMENT_TARGET=12.7 delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}
187-
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: python scripts/zip_filter.py "{wheel}" "*.c" "*.cpp" "*.cc" "*.h" "*.hpp" "*.pyx" "*.md" && mv "{wheel}" "{dest_dir}"
188-
CIBW_BEFORE_TEST_LINUX: /host/${{ env.SCCACHE_PATH }} --show-stats
189-
CIBW_BEFORE_TEST_MACOS: ${{ env.SCCACHE_PATH }} --show-stats
190-
CIBW_TEST_COMMAND: "python {project}/tests/smoke_test.py"
147+
191148
- name: Validate wheel RECORD files
192149
shell: bash
193150
run: |

.github/workflows/system-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
persist-credentials: false
4646
repository: 'DataDog/system-tests'
4747
# Automatically managed, use scripts/update-system-tests-version to update
48-
ref: '6d02d86d456377cca26e10adb80249d0ee5108fb'
48+
ref: '2eb26336ed43c2db1b7f90fff17ce4f5fc36a12b'
4949

5050
- name: Download wheels to binaries directory
5151
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
@@ -90,7 +90,7 @@ jobs:
9090
persist-credentials: false
9191
repository: 'DataDog/system-tests'
9292
# Automatically managed, use scripts/update-system-tests-version to update
93-
ref: '6d02d86d456377cca26e10adb80249d0ee5108fb'
93+
ref: '2eb26336ed43c2db1b7f90fff17ce4f5fc36a12b'
9494

9595
- name: Build runner
9696
uses: ./.github/actions/install_runner
@@ -275,7 +275,7 @@ jobs:
275275
persist-credentials: false
276276
repository: 'DataDog/system-tests'
277277
# Automatically managed, use scripts/update-system-tests-version to update
278-
ref: '6d02d86d456377cca26e10adb80249d0ee5108fb'
278+
ref: '2eb26336ed43c2db1b7f90fff17ce4f5fc36a12b'
279279
- name: Download wheels to binaries directory
280280
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
281281
with:

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
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: "6d02d86d456377cca26e10adb80249d0ee5108fb"
17+
SYSTEM_TESTS_REF: "2eb26336ed43c2db1b7f90fff17ce4f5fc36a12b"
1818

1919
default:
2020
interruptible: true

.gitlab/benchmarks/bp-runner.microbenchmarks.fail-on-breach.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1092,7 +1092,7 @@ experiments:
10921092
- max_rss_usage < 35.50 MB
10931093
- name: telemetryaddmetric-1-distribution-metrics-100-times
10941094
thresholds:
1095-
- execution_time < 0.22 ms
1095+
- execution_time < 0.23 ms
10961096
- max_rss_usage < 35.50 MB
10971097
- name: telemetryaddmetric-1-gauge-metric-1-times
10981098
thresholds:

.riot/requirements/13e0d21.txt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#
2+
# This file is autogenerated by pip-compile with Python 3.13
3+
# by the following command:
4+
#
5+
# pip-compile --allow-unsafe --no-annotate .riot/requirements/13e0d21.in
6+
#
7+
aiokafka==0.9.0
8+
async-timeout==5.0.1
9+
attrs==25.4.0
10+
coverage[toml]==7.11.0
11+
hypothesis==6.45.0
12+
iniconfig==2.3.0
13+
mock==5.2.0
14+
opentracing==2.4.0
15+
packaging==25.0
16+
pluggy==1.6.0
17+
pygments==2.19.2
18+
pytest==8.4.2
19+
pytest-asyncio==1.2.0
20+
pytest-cov==7.0.0
21+
pytest-mock==3.15.1
22+
pytest-randomly==4.0.1
23+
sortedcontainers==2.4.0

.riot/requirements/1c72bfb.txt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#
2+
# This file is autogenerated by pip-compile with Python 3.13
3+
# by the following command:
4+
#
5+
# pip-compile --allow-unsafe --no-annotate .riot/requirements/1c72bfb.in
6+
#
7+
aiokafka==0.12.0
8+
async-timeout==5.0.1
9+
attrs==25.4.0
10+
coverage[toml]==7.11.0
11+
hypothesis==6.45.0
12+
iniconfig==2.3.0
13+
mock==5.2.0
14+
opentracing==2.4.0
15+
packaging==25.0
16+
pluggy==1.6.0
17+
pygments==2.19.2
18+
pytest==8.4.2
19+
pytest-asyncio==1.2.0
20+
pytest-cov==7.0.0
21+
pytest-mock==3.15.1
22+
pytest-randomly==4.0.1
23+
sortedcontainers==2.4.0
24+
typing-extensions==4.15.0

.riot/requirements/1ded764.txt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#
2+
# This file is autogenerated by pip-compile with Python 3.14
3+
# by the following command:
4+
#
5+
# pip-compile --allow-unsafe --no-annotate .riot/requirements/1ded764.in
6+
#
7+
aiokafka==0.9.0
8+
async-timeout==5.0.1
9+
attrs==25.4.0
10+
coverage[toml]==7.11.0
11+
hypothesis==6.45.0
12+
iniconfig==2.3.0
13+
mock==5.2.0
14+
opentracing==2.4.0
15+
packaging==25.0
16+
pluggy==1.6.0
17+
pygments==2.19.2
18+
pytest==8.4.2
19+
pytest-asyncio==1.2.0
20+
pytest-cov==7.0.0
21+
pytest-mock==3.15.1
22+
pytest-randomly==4.0.1
23+
sortedcontainers==2.4.0

0 commit comments

Comments
 (0)