Skip to content

Commit aadcd56

Browse files
authored
Merge branch 'main' into dd/fix-span-overflow-check
2 parents 3fa0c53 + 660c550 commit aadcd56

File tree

131 files changed

+5731
-317
lines changed

Some content is hidden

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

131 files changed

+5731
-317
lines changed

.codecov.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ component_management:
7676
paths:
7777
- libdd-trace-normalization
7878
- component_id: trace-obfuscation # this is an identifier that should not be changed
79-
name: datadog-trace-obfuscation # this is a display name, and can be changed freely
79+
name: libdd-trace-obfuscation # this is a display name, and can be changed freely
8080
paths:
81-
- datadog-trace-obfuscation
81+
- libdd-trace-obfuscation
8282
- component_id: trace-protobuf # this is an identifier that should not be changed
8383
name: libdd-trace-protobuf # this is a display name, and can be changed freely
8484
paths:

.github/CODEOWNERS

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
.gitignore @Datadog/libdatadog
1212
.gitlab-ci.yml @Datadog/apm-common-components-core
1313
.gitlab/benchmarks.yml @Datadog/apm-common-components-core
14+
.gitlab/fuzz.yml @Datadog/chaos-platform
1415
benchmark/ @Datadog/apm-common-components-core
1516
bin_tests/ @Datadog/libdatadog-profiling
1617
build-common/ @Datadog/apm-common-components-core
@@ -28,7 +29,6 @@ datadog-remote-config @Datadog/libdatadog-php @Datadog/libdatadog
2829
datadog-sidecar @Datadog/libdatadog-php @Datadog/libdatadog-apm
2930
datadog-sidecar-ffi @Datadog/libdatadog-php @Datadog/libdatadog-apm
3031
datadog-sidecar-macros @Datadog/libdatadog-php
31-
datadog-trace-obfuscation @Datadog/serverless @Datadog/libdatadog-apm
3232
datadog-tracer-flare @Datadog/libdatadog-apm
3333
docker-bake.hcl @Datadog/apm-common-components-core
3434
docs @Datadog/libdatadog
@@ -45,6 +45,7 @@ libdd-profiling*/ @Datadog/libdatadog-profiling
4545
libdd-telemetry*/ @Datadog/apm-common-components-core
4646
libdd-tinybytes @Datadog/apm-common-components-core
4747
libdd-trace-normalization @Datadog/serverless @Datadog/libdatadog-apm
48+
libdd-trace-obfuscation @Datadog/serverless @Datadog/libdatadog-apm
4849
libdd-trace-protobuf @Datadog/serverless @Datadog/libdatadog-apm
4950
libdd-trace-stats @Datadog/apm-common-components-core
5051
libdd-trace-utils @Datadog/serverless @Datadog/libdatadog-apm
@@ -64,6 +65,7 @@ tests/spawn_from_lib/ @Datadog/libdatadog-php @Datadog/libdatadog
6465
tests/windows_package/ @Datadog/apm-common-components-core
6566
tools/ @Datadog/apm-common-components-core
6667
windows/ @Datadog/libdatadog-core
68+
fuzz/ @Datadog/chaos-platform
6769

6870
# Specific overrides (must come after their general patterns above)
6971
bin_tests/tests/test_the_tests.rs @Datadog/libdatadog-core

.github/labeler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ mini-agent:
2525
- changed-files:
2626
- any-glob-to-any-file: [
2727
'datadog-trace-normalization/**/*',
28-
'datadog-trace-obfuscation/**/*',
28+
'libdd-trace-obfuscation/**/*',
2929
'libdd-trace-utils/**/*',
3030
]
3131

.github/workflows/test.yml

Lines changed: 73 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,50 @@ jobs:
8181
include_passed: true
8282
- name: Upload test results to Datadog
8383
if: success() || failure()
84-
uses: datadog/junit-upload-github-action@762867566348d59ac9bcf479ebb4ec040db8940a
85-
with:
86-
api_key: ${{ secrets.DATADOG_API_KEY }}
87-
env: ci
88-
service: libdatadog
89-
files: target/nextest/ci/junit.xml
90-
logs: true
91-
tags: rustc:${{ matrix.rust_version }},arch:${{ runner.arch }},os:${{ runner.os }},platform:${{ matrix.platform }}
84+
shell: bash
85+
run: |
86+
# Download datadog-ci binary
87+
if [ "${{ runner.os }}" == "Linux" ]; then
88+
URL="https://github.com/DataDog/datadog-ci/releases/download/v4.2.2/datadog-ci_linux-x64"
89+
OUTPUT="datadog-ci"
90+
CHECKSUM_CMD="sha256sum"
91+
EXPECTED_CHECKSUM="3e1e9649d15d3feacced89ec90de66151046a58c7844217e4112362ad8dbf8d1"
92+
elif [ "${{ runner.os }}" == "Windows" ]; then
93+
URL="https://github.com/DataDog/datadog-ci/releases/download/v4.2.2/datadog-ci_win-x64"
94+
OUTPUT="datadog-ci.exe"
95+
CHECKSUM_CMD="sha256sum"
96+
EXPECTED_CHECKSUM="13313279cb884fe098e2f80ca21d23e67b78a090a12e891e8e35be653ee2bbd0"
97+
elif [ "${{ runner.os }}" == "macOS" ]; then
98+
URL="https://github.com/DataDog/datadog-ci/releases/download/v4.2.2/datadog-ci_darwin-x64"
99+
OUTPUT="datadog-ci"
100+
CHECKSUM_CMD="shasum -a 256"
101+
EXPECTED_CHECKSUM="071a6140b17438b3f9dd6c65da48b48ea03fc310034fa624ce874fdb6c325da4"
102+
fi
103+
104+
echo "Downloading datadog-ci from $URL"
105+
curl -L --fail --retry 3 -o "$OUTPUT" "$URL"
106+
chmod +x "$OUTPUT"
107+
108+
# Verify checksum
109+
ACTUAL_CHECKSUM=$($CHECKSUM_CMD "$OUTPUT" | cut -d' ' -f1)
110+
echo "Expected checksum: $EXPECTED_CHECKSUM"
111+
echo "Actual checksum: $ACTUAL_CHECKSUM"
112+
113+
if [ "$ACTUAL_CHECKSUM" != "$EXPECTED_CHECKSUM" ]; then
114+
echo "Checksum verification failed!"
115+
exit 1
116+
fi
117+
echo "Checksum verification passed"
118+
119+
# Upload test results
120+
./"$OUTPUT" junit upload \
121+
--service libdatadog \
122+
--env ci \
123+
--logs \
124+
--tags rustc:${{ matrix.rust_version }},arch:${{ runner.arch }},os:${{ runner.os }},platform:${{ matrix.platform }} \
125+
target/nextest/ci/junit.xml
126+
env:
127+
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}
92128

93129
ffi:
94130
name: "FFI #${{ matrix.platform }} ${{ matrix.rust_version }}"
@@ -198,6 +234,35 @@ jobs:
198234
cmake -S .. -DDatadog_ROOT=$LIBDD_OUTPUT_FOLDER
199235
cmake --build .
200236
fi
237+
- name: "Test building CXX bindings - Crashinfo (Unix)"
238+
shell: bash
239+
if: matrix.platform != 'windows-latest'
240+
run: |
241+
set -e
242+
cd examples/cxx
243+
./build-and-run-crashinfo.sh
244+
- name: "Test building CXX bindings - Profiling (Unix)"
245+
shell: bash
246+
if: matrix.platform != 'windows-latest'
247+
run: |
248+
set -e
249+
cd examples/cxx
250+
./build-profiling.sh
251+
- name: "Setup MSVC (Windows)"
252+
if: matrix.platform == 'windows-latest'
253+
uses: ilammy/msvc-dev-cmd@v1
254+
- name: "Test building CXX bindings - Crashinfo (Windows)"
255+
shell: pwsh
256+
if: matrix.platform == 'windows-latest'
257+
run: |
258+
cd examples/cxx
259+
.\build-and-run-crashinfo.ps1
260+
- name: "Test building CXX bindings - Profiling (Windows)"
261+
shell: pwsh
262+
if: matrix.platform == 'windows-latest'
263+
run: |
264+
cd examples/cxx
265+
.\build-profiling.ps1
201266
202267
cross-centos7:
203268
name: build and test using cross - on centos7

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ build/
1111
cmake-build-debug
1212
deliverables
1313
docker-linux-target
14+
release
1415
target
1516
tmp
1617
__fuzz__
@@ -24,3 +25,8 @@ Cargo.lock # this is ignored so you don't update by accident, but is committed.
2425
docker-sync.yml
2526
libtest.so
2627
libtest_cpp.so
28+
examples/cxx/crashinfo
29+
examples/cxx/crashinfo.exe
30+
examples/cxx/profiling
31+
examples/cxx/profiling.exe
32+
profile.pprof

.gitlab-ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ variables:
77

88
include:
99
- local: .gitlab/benchmarks.yml
10+
- local: .gitlab/fuzz.yml
1011

1112
trigger_internal_build:
1213
variables:

.gitlab/fuzz.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Fuzzing job configuration
2+
# This job discovers, builds, and uploads all cargo-fuzz targets to the internal fuzzing infrastructure
3+
# See ci/README_FUZZING.md for more information
4+
5+
variables:
6+
BASE_CI_IMAGE: registry.ddbuild.io/ci/benchmarking-platform:libdatadog-benchmarks
7+
8+
fuzz:
9+
tags: ["arch:amd64"]
10+
needs: []
11+
image:
12+
name: $BASE_CI_IMAGE
13+
rules:
14+
# runs on gitlab schedule and on merge to main.
15+
# Also allow manual run in branches for ease of debug / testing
16+
- if: '$CI_COMMIT_BRANCH == "main" && $CI_PIPELINE_SOURCE == "schedule"'
17+
allow_failure: true
18+
- if: $CI_COMMIT_BRANCH == "main"
19+
allow_failure: true
20+
- when: manual
21+
allow_failure: true
22+
timeout: 1h
23+
script:
24+
- VAULT_VERSION=1.15.4 && curl -fsSL "https://releases.hashicorp.com/vault/${VAULT_VERSION}/vault_${VAULT_VERSION}_linux_amd64.zip" -o vault.zip && unzip vault.zip && mv vault /usr/local/bin/vault && rm vault.zip && chmod +x /usr/local/bin/vault
25+
- rustup default nightly
26+
- cargo install cargo-fuzz
27+
- pip3 install requests toml
28+
- python3 fuzz/fuzz_infra.py
29+
allow_failure: true
30+
variables:
31+
KUBERNETES_SERVICE_ACCOUNT_OVERWRITE: libdatadog

0 commit comments

Comments
 (0)