Skip to content

Commit 6d6a9e9

Browse files
Merge branch 'main' into vianney/add-timeout-to-info-fetcher
2 parents dd754e5 + 0b00c9c commit 6d6a9e9

1,056 files changed

Lines changed: 3930 additions & 152586 deletions

File tree

Some content is hidden

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

.github/CODEOWNERS

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ libdd-ddsketch*/ @DataDog/libdatadog-apm @DataDog/apm-common
4646
libdd-dogstatsd-client @DataDog/apm-common-components-core
4747
libdd-http-client @DataDog/apm-common-components-core
4848
libdd-library-config*/ @DataDog/apm-sdk-capabilities-rust
49-
libdd-libunwind*/ @DataDog/libdatadog-profiling
5049
libdd-log*/ @DataDog/apm-common-components-core
50+
libdd-otel-thread-ctx/ @DataDog/apm-common-components-core
5151
libdd-profiling*/ @DataDog/libdatadog-profiling
5252
libdd-shared-runtime*/ @DataDog/apm-common-components-core
5353
libdd-telemetry*/ @DataDog/apm-common-components-core
@@ -66,6 +66,8 @@ repository.datadog.yml @DataDog/apm-common-components-core
6666
rustfmt.toml @DataDog/libdatadog-core
6767
scripts/check_cargo_metadata.sh @DataDog/libdatadog-core
6868
scripts/commits-since-release.sh @DataDog/libdatadog-core
69+
scripts/crates-to-package.sh @DataDog/libdatadog-core
70+
scripts/major-bumps-level.sh @DataDog/libdatadog-core
6971
scripts/publication-order.sh @DataDog/libdatadog-core
7072
scripts/reformat_copyright.sh @DataDog/libdatadog-core
7173
scripts/semver-level.sh @DataDog/libdatadog-core
@@ -84,6 +86,6 @@ bin_tests/tests/test_the_tests.rs @DataDog/libdatadog-core
8486
bin_tests/src/bin/test_the_tests.rs @DataDog/libdatadog-core
8587
tools/cc_utils/ @DataDog/libdatadog-php
8688
tools/sidecar_mockgen/ @DataDog/libdatadog-php
87-
libdd-data-pipeline/src/otlp/ @DataDog/apm-sdk-capabilities
88-
libdd-data-pipeline/tests/test_trace_exporter_otlp_export.rs @DataDog/apm-sdk-capabilities
89-
libdd-trace-utils/src/otlp_encoder/ @DataDog/apm-sdk-capabilities
89+
libdd-data-pipeline/src/otlp/ @DataDog/apm-sdk-capabilities-rust
90+
libdd-data-pipeline/tests/test_trace_exporter_otlp_export.rs @DataDog/apm-sdk-capabilities-rust
91+
libdd-trace-utils/src/otlp_encoder/ @DataDog/apm-sdk-capabilities-rust

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
export AWS_LC_FIPS_SYS_NO_ASM=1
6262
fi
6363
# shellcheck disable=SC2046
64-
cargo clippy --workspace --all-targets --all-features -- -D warnings
64+
cargo clippy --workspace --all-targets --all-features -- -D warnings $([ ${{ matrix.rust_version }} = 1.84.1 ] || echo -Aclippy::manual_is_multiple_of)
6565
6666
licensecheck:
6767
runs-on: ubuntu-latest
@@ -73,7 +73,7 @@ jobs:
7373
run: sudo apt-get install -y licensecheck
7474
- name: Check licenses
7575
# Exclude symbolizer-ffi from the checks (mostly imported code)
76-
run: '! find . \( -name "*.rs" -o -name "*.c" -o -name "*.sh" \) -not -path "./symbolizer-ffi/*" -not -path "./datadog-ipc/plugins/*" -not -path "./datadog-ipc/tarpc/*" -not -path "./libdd-libunwind-sys/libunwind/*" -print0 | xargs -0 licensecheck -c ".*" | grep -v "Apache License 2.0"'
76+
run: '! find . \( -name "*.rs" -o -name "*.c" -o -name "*.sh" \) -not -path "./symbolizer-ffi/*" -not -path "./datadog-ipc/plugins/*" -not -path "./datadog-ipc/tarpc/*" -print0 | xargs -0 licensecheck -c ".*" | grep -v "Apache License 2.0"'
7777

7878
license-3rdparty:
7979
runs-on: ubuntu-latest

.github/workflows/release-proposal-dispatch.yml

Lines changed: 257 additions & 73 deletions
Large diffs are not rendered by default.

.github/workflows/release-proposal-test.yml

Lines changed: 47 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,63 @@ jobs:
1313
permissions:
1414
id-token: write # Enable OIDC
1515
runs-on: ubuntu-latest
16+
outputs:
17+
upload_artifact: ${{ steps.package-crates.outputs.upload_artifact }}
1618
steps:
1719
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
1820
with:
1921
fetch-depth: 0
22+
# Checkout PR head (not the synthetic merge commit) so version comparison matches the proposal branch.
23+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
2024
- uses: dtolnay/rust-toolchain@stable
2125
with:
2226
toolchain: 1.92.0
2327

24-
- name: Package the workspace
28+
# origin/main is needed for merge-base on push; PR base SHA must be fetched for git show.
29+
- name: Fetch refs for version comparison
2530
run: |
26-
cargo package --workspace --exclude "libdd-*-ffi" --exclude libdd-crashtracker --exclude libdd-libunwind-sys --exclude "datadog-*" \
27-
--exclude bin_tests --exclude "tools" --exclude "sidecar_mockgen" --exclude "cc_utils" --exclude spawn_worker --exclude symbolizer-ffi \
28-
--exclude test_spawn_from_lib --exclude build-common --exclude builder --all-features
31+
git fetch origin main
32+
if [ "${{ github.event_name }}" = "pull_request" ]; then
33+
git fetch --no-tags origin "${{ github.event.pull_request.base.sha }}"
34+
fi
35+
36+
# Compare [package] versions between PR base and head (or merge-base(main,HEAD) vs push on direct push).
37+
# Dependency-only manifest edits are ignored; excludes match the old cargo package --exclude list.
38+
- name: Package crates with version bumps vs comparison base
39+
id: package-crates
40+
run: |
41+
set -euo pipefail
42+
if [ "${{ github.event_name }}" = "pull_request" ]; then
43+
GIT_VERSION_BASE="${{ github.event.pull_request.base.sha }}"
44+
export GIT_VERSION_BASE
45+
GIT_VERSION_HEAD="${{ github.event.pull_request.head.sha }}"
46+
export GIT_VERSION_HEAD
47+
else
48+
# Direct push: compare from fork point with main, not origin/main's current tip (main may have advanced).
49+
GIT_VERSION_BASE="$(git merge-base origin/main HEAD)"
50+
export GIT_VERSION_BASE
51+
GIT_VERSION_HEAD="${GITHUB_SHA}"
52+
export GIT_VERSION_HEAD
53+
fi
54+
55+
echo "Comparing Cargo.toml package versions: GIT_VERSION_BASE=${GIT_VERSION_BASE} GIT_VERSION_HEAD=${GIT_VERSION_HEAD}"
56+
mapfile -t PACKAGES < <(./scripts/crates-to-package.sh)
57+
echo "Packages to run cargo package on (version bump only):"
58+
printf '%s\n' "${PACKAGES[@]}"
59+
PKG_ARGS=()
60+
for p in "${PACKAGES[@]}"; do
61+
PKG_ARGS+=(-p "$p")
62+
done
63+
if [ "${#PKG_ARGS[@]}" -eq 0 ]; then
64+
echo "upload_artifact=false" >> "$GITHUB_OUTPUT"
65+
echo "Skipping cargo package: no crates had a version bump vs the base ref (PKG_ARGS is empty)."
66+
exit 0
67+
fi
68+
cargo package "${PKG_ARGS[@]}" --all-features
69+
echo "upload_artifact=true" >> "$GITHUB_OUTPUT"
2970
3071
- name: Upload crates
72+
if: steps.package-crates.outputs.upload_artifact == 'true'
3173
uses: actions/upload-artifact@v4
3274
with:
3375
name: release-proposal-test-crates
@@ -40,6 +82,7 @@ jobs:
4082
id-token: write # Enable OIDC
4183
runs-on: ubuntu-latest
4284
needs: package-and-upload-crates
85+
if: needs.package-and-upload-crates.outputs.upload_artifact == 'true'
4386
strategy:
4487
matrix:
4588
version: ["datadog-opentelemetry-v0.3.2", "datadog-opentelemetry-v0.3.1"]

.gitlab-ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,17 @@ trigger_internal_build:
2121
LIBDATADOG_COMMIT_TITLE: $CI_COMMIT_TITLE
2222
LIBDATADOG_ENABLE_MACOS_JOBS: "false"
2323
LIBDATADOG_IS_RELEASE_BRANCH: "false"
24+
LIBDATADOG_IS_HOTFIX_BRANCH: "false"
2425
rules:
2526
- if: '$CI_COMMIT_BRANCH =~ /^release\//'
2627
variables:
2728
LIBDATADOG_IS_RELEASE_BRANCH: "true"
2829
when: always
30+
- if: '$CI_COMMIT_BRANCH =~ /^hotfix\//'
31+
variables:
32+
LIBDATADOG_IS_RELEASE_BRANCH: "true"
33+
LIBDATADOG_IS_HOTFIX_BRANCH: "true"
34+
when: always
2935
- if: '$CI_EXTERNAL_PULL_REQUEST_SOURCE_BRANCH_NAME =~ /^release\//'
3036
when: always
3137
- if: '$CI_COMMIT_BRANCH == "main"'

Cargo.lock

Lines changed: 37 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ members = [
1515
"libdd-library-config-ffi",
1616
"datadog-live-debugger",
1717
"datadog-live-debugger-ffi",
18+
"libdd-otel-thread-ctx",
1819
"libdd-profiling",
1920
"libdd-profiling-ffi",
2021
"libdd-profiling-protobuf",
@@ -51,7 +52,7 @@ members = [
5152
"libdd-dogstatsd-client",
5253
"libdd-http-client",
5354
"libdd-log",
54-
"libdd-log-ffi", "libdd-libunwind-sys",
55+
"libdd-log-ffi",
5556
]
5657

5758
# https://doc.rust-lang.org/cargo/reference/resolver.html

LICENSE-3rdparty.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ kernel32-sys,https://github.com/retep998/winapi-rs,MIT,Peter Atashian <retep998@
219219
kv-log-macro,https://github.com/yoshuawuyts/kv-log-macro,MIT OR Apache-2.0,Yoshua Wuyts <[email protected]>
220220
lazy_static,https://github.com/rust-lang-nursery/lazy-static.rs,MIT OR Apache-2.0,Marvin Löbel <[email protected]>
221221
libc,https://github.com/rust-lang/libc,MIT OR Apache-2.0,The Rust Project Developers
222+
libdd-libunwind-sys,https://github.com/DataDog/libdatadog/tree/main/libdd-libunwind-sys,Apache-2.0,The libdd-libunwind-sys Authors
222223
libloading,https://github.com/nagisa/rust_libloading,ISC,Simonas Kazlauskas <[email protected]>
223224
libredox,https://gitlab.redox-os.org/redox-os/libredox,MIT,4lDO2 <[email protected]>
224225
libz-rs-sys,https://github.com/trifectatechfoundation/zlib-rs,Zlib,The libz-rs-sys Authors

bin_tests/src/bin/crashtracker_bin_test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ mod unix {
8686
"receiver_symbols" => {
8787
crashtracker::StacktraceCollection::EnabledWithSymbolsInReceiver
8888
}
89-
_ => crashtracker::StacktraceCollection::WithoutSymbols,
89+
_ => crashtracker::StacktraceCollection::EnabledWithSymbolsInReceiver,
9090
},
91-
Err(_) => crashtracker::StacktraceCollection::WithoutSymbols,
91+
Err(_) => crashtracker::StacktraceCollection::EnabledWithSymbolsInReceiver,
9292
};
9393

9494
// Ensure the receiver gets a timeout consistent with the collector's.

datadog-ipc/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ publish = false
88

99
[dependencies]
1010
anyhow = { version = "1.0" }
11+
zwohash = "0.1.2"
1112
bincode = { version = "1" }
1213
futures = { version = "0.3", default-features = false }
1314
io-lifetimes = { version = "1.0" }
@@ -19,6 +20,9 @@ libdd-tinybytes = { path = "../libdd-tinybytes", optional = true }
1920

2021

2122
libdd-common = { path = "../libdd-common" }
23+
libdd-ddsketch = { path = "../libdd-ddsketch" }
24+
libdd-trace-protobuf = { path = "../libdd-trace-protobuf" }
25+
libdd-trace-stats = { path = "../libdd-trace-stats" }
2226
datadog-ipc-macros = { path = "../datadog-ipc-macros" }
2327
tracing = { version = "0.1", default-features = false }
2428

0 commit comments

Comments
 (0)