Skip to content

Commit 833d44b

Browse files
committed
Merge branch 'main' into estringana/add-routes-collection
2 parents 71f43e1 + aa11985 commit 833d44b

File tree

30 files changed

+1180
-91
lines changed

30 files changed

+1180
-91
lines changed

.github/workflows/test.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,16 @@ jobs:
5151
- name: "[${{ steps.rust-version.outputs.version}}] cargo build --workspace --exclude builder --verbose"
5252
shell: bash
5353
run: cargo build --workspace --exclude builder --verbose
54-
- name: "[${{ steps.rust-version.outputs.version}}] cargo nextest run --workspace --exclude builder --profile ci --verbose -E '!test(tracing_integration_tests::)'"
54+
- name: "[${{ steps.rust-version.outputs.version}}] cargo nextest run --workspace --features datadog-crashtracker/generate-unit-test-files --exclude builder --profile ci --verbose -E '!test(tracing_integration_tests::)'"
5555
shell: bash
5656
# Run doc tests with cargo test and run tests with nextest and generate junit.xml
57-
run: cargo test --workspace --exclude builder --doc --verbose && cargo nextest run --workspace --exclude builder --profile ci --verbose -E '!test(tracing_integration_tests::)'
57+
run: cargo test --workspace --features datadog-crashtracker/generate-unit-test-files --exclude builder --doc --verbose && cargo nextest run --workspace --features datadog-crashtracker/generate-unit-test-files --exclude builder --profile ci --verbose -E '!test(tracing_integration_tests::)'
5858
env:
5959
RUST_BACKTRACE: full
60-
- name: "[${{ steps.rust-version.outputs.version}}] Tracing integration tests: cargo nextest run --workspace --exclude builder --profile ci --test-threads=1 --verbose -E 'test(tracing_integration_tests::)'"
60+
- name: "[${{ steps.rust-version.outputs.version}}] Tracing integration tests: cargo nextest run --workspace --features datadog-crashtracker/generate-unit-test-files --exclude builder --profile ci --test-threads=1 --verbose -E 'test(tracing_integration_tests::)'"
6161
if: runner.os == 'Linux'
6262
shell: bash
63-
run: cargo nextest run --workspace --exclude builder --profile ci --test-threads=1 --verbose -E 'test(tracing_integration_tests::)'
63+
run: cargo nextest run --workspace --features datadog-crashtracker/generate-unit-test-files --exclude builder --profile ci --test-threads=1 --verbose -E 'test(tracing_integration_tests::)'
6464
env:
6565
RUST_BACKTRACE: full
6666
- name: "[${{ steps.rust-version.outputs.version}}] RUSTFLAGS=\"-C prefer-dynamic\" cargo nextest run --package test_spawn_from_lib --features prefer-dynamic -E '!test(tracing_integration_tests::)'"
@@ -148,7 +148,7 @@ jobs:
148148
env:
149149
RUSTFLAGS: "${{ matrix.flags }}"
150150
run: |
151-
cargo run --bin release --features profiling,telemetry,data-pipeline,symbolizer,crashtracker,library-config,log --release -- --out $LIBDD_OUTPUT_FOLDER
151+
cargo run --bin release --features profiling,telemetry,data-pipeline,symbolizer,crashtracker,library-config,log,ddsketch --release -- --out $LIBDD_OUTPUT_FOLDER
152152
153153
- name: 'Publish libdatadog'
154154
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # 4.6.1
@@ -225,8 +225,8 @@ jobs:
225225
rust_version: cross-centos7
226226
- run: cargo install cross || true
227227
- run: cross build --workspace --target x86_64-unknown-linux-gnu --exclude builder
228-
- run: cross test --workspace --target x86_64-unknown-linux-gnu --exclude builder -- --skip "::single_threaded_tests::" --skip "tracing_integration_tests::"
229-
- run: cross test --workspace --target x86_64-unknown-linux-gnu --exclude builder --exclude bin_tests -- --skip "::tests::" --skip "::api_tests::" --test-threads 1 --skip "tracing_integration_tests::"
228+
- run: cross test --workspace --features datadog-crashtracker/generate-unit-test-files --target x86_64-unknown-linux-gnu --exclude builder -- --skip "::single_threaded_tests::" --skip "tracing_integration_tests::"
229+
- run: cross test --workspace --features datadog-crashtracker/generate-unit-test-files --target x86_64-unknown-linux-gnu --exclude builder --exclude bin_tests -- --skip "::tests::" --skip "::api_tests::" --test-threads 1 --skip "tracing_integration_tests::"
230230

231231
ffi_bake:
232232
strategy:

Cargo.lock

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

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ members = [
3939
"data-pipeline",
4040
"data-pipeline-ffi",
4141
"ddsketch",
42+
"ddsketch-ffi",
4243
"tinybytes",
4344
"dogstatsd-client",
4445
"datadog-log",

LICENSE-3rdparty.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
root_name: builder, build_common, tools, datadog-alloc, datadog-crashtracker, ddcommon, ddtelemetry, datadog-ddsketch, datadog-crashtracker-ffi, ddcommon-ffi, datadog-ipc, datadog-ipc-macros, tarpc, tarpc-plugins, tinybytes, spawn_worker, cc_utils, datadog-library-config, datadog-library-config-ffi, datadog-live-debugger, datadog-live-debugger-ffi, datadog-profiling, datadog-profiling-protobuf, datadog-profiling-ffi, data-pipeline-ffi, data-pipeline, datadog-trace-protobuf, datadog-trace-utils, datadog-trace-normalization, dogstatsd-client, datadog-log-ffi, datadog-log, ddtelemetry-ffi, symbolizer-ffi, datadog-profiling-replayer, datadog-remote-config, datadog-sidecar, datadog-sidecar-macros, datadog-sidecar-ffi, datadog-trace-obfuscation, datadog-tracer-flare, sidecar_mockgen, test_spawn_from_lib
1+
root_name: builder, build_common, tools, datadog-alloc, datadog-crashtracker, ddcommon, ddtelemetry, datadog-ddsketch, cc_utils, datadog-crashtracker-ffi, ddcommon-ffi, datadog-ipc, datadog-ipc-macros, tarpc, tarpc-plugins, tinybytes, spawn_worker, datadog-library-config, datadog-library-config-ffi, datadog-live-debugger, datadog-live-debugger-ffi, datadog-profiling, datadog-profiling-protobuf, datadog-profiling-ffi, data-pipeline-ffi, data-pipeline, datadog-trace-protobuf, datadog-trace-utils, datadog-trace-normalization, dogstatsd-client, datadog-log-ffi, datadog-log, ddsketch-ffi, ddtelemetry-ffi, symbolizer-ffi, datadog-profiling-replayer, datadog-remote-config, datadog-sidecar, datadog-sidecar-macros, datadog-sidecar-ffi, datadog-trace-obfuscation, datadog-tracer-flare, sidecar_mockgen, test_spawn_from_lib
22
third_party_libraries:
33
- package_name: addr2line
44
package_version: 0.24.2

build-profiling-ffi.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ FEATURES=(
153153
"datadog-profiling-ffi/demangler"
154154
"datadog-library-config-ffi"
155155
"datadog-log-ffi"
156+
"ddsketch-ffi"
156157
)
157158
if [[ "$symbolizer" -eq 1 ]]; then
158159
FEATURES+=("symbolizer")
@@ -237,7 +238,7 @@ echo "Generating $destdir/include/libdatadog headers..."
237238
rm -r $destdir/include/datadog/
238239
mkdir $destdir/include/datadog/
239240

240-
CBINDGEN_HEADERS="common.h profiling.h telemetry.h crashtracker.h data-pipeline.h library-config.h log.h"
241+
CBINDGEN_HEADERS="common.h profiling.h telemetry.h crashtracker.h data-pipeline.h library-config.h log.h ddsketch.h"
241242
# When optional features are added, don't forget to also include the headers here
242243
case $ARG_FEATURES in
243244
esac

builder/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ data-pipeline = []
1515
symbolizer = []
1616
library-config = []
1717
log = []
18+
ddsketch = []
1819

1920
[lib]
2021
bench = false

builder/src/bin/release.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ pub fn main() {
7070
f.push("datadog-library-config-ffi".to_string());
7171
#[cfg(feature = "log")]
7272
f.push("datadog-log-ffi".to_string());
73+
#[cfg(feature = "ddsketch")]
74+
f.push("ddsketch-ffi".to_string());
7375
f
7476
};
7577

builder/src/profiling.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ impl Profiling {
5555
headers.push("library-config.h");
5656
#[cfg(feature = "log")]
5757
headers.push("log.h");
58+
#[cfg(feature = "ddsketch")]
59+
headers.push("ddsketch.h");
5860

5961
let mut origin_path: PathBuf = [&self.source_include, "dummy.h"].iter().collect();
6062
let mut target_path: PathBuf = [&self.target_include, "dummy.h"].iter().collect();

data-pipeline-ffi/src/trace_exporter.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,7 +1080,8 @@ mod tests {
10801080
let mock_metrics = server.mock(|when, then| {
10811081
when.method(POST)
10821082
.path("/telemetry/proxy/api/v2/apmtelemetry")
1083-
.body_contains(r#""runtime_id":"foo""#);
1083+
.body_contains(r#""runtime_id":"foo""#)
1084+
.body_contains(r#""metric":"trace_api."#);
10841085
then.status(200)
10851086
.header("content-type", "application/json")
10861087
.body("");
@@ -1132,7 +1133,7 @@ mod tests {
11321133
);
11331134

11341135
ddog_trace_exporter_free(exporter);
1135-
// It should receive 1 payloads: metrics
1136+
// It should receive 1 metrics payload (excluding heartbeats)
11361137
mock_metrics.assert_hits(1);
11371138
}
11381139
}

datadog-crashtracker/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ collector = []
2424
receiver = []
2525
# Enables the collection of crash-info on Windows
2626
collector_windows = []
27+
generate-unit-test-files = []
2728

2829
[target.'cfg(unix)'.dependencies]
2930
# Should be kept in sync with the libdatadog symbolizer crate (also using blasesym)
@@ -63,3 +64,4 @@ tempfile = { version = "3.3" }
6364
[build-dependencies]
6465
# If we use a newer version of cc, CI fails on alpine.
6566
cc = "1.1.31"
67+
cc_utils = {path = "../tools/cc_utils"}

0 commit comments

Comments
 (0)