Skip to content

Conversation

@realFlowControl
Copy link
Member

@realFlowControl realFlowControl commented Nov 21, 2025

What does this PR do?

Add an iterator that will consume the rest of the iterator on drop. Also changes the upscale_values function signature, as this function can't fail.

Motivation

We have seen crashes because of this assertion:

fn drop(&mut self) {
assert_eq!(
self.data,
std::ptr::null_mut(),
"Dropped TrimmedObservation that still owned data."
);
}

This can happen if this loop bails out early:

for (sample, timestamp, mut values) in iter {
let labels = &mut extended_label_sets[sample.labels.to_raw_id()];
let location_ids: Vec<_> = self
.get_stacktrace(sample.stacktrace)?
.locations
.iter()
.map(Id::to_raw_id)
.collect();
self.check_location_ids_are_valid(&location_ids, self.locations.len())?;
self.upscaling_rules.upscale_values(&mut values, labels)?;
// Use the extra slot in the labels vector to store the timestamp without any reallocs.
if let Some(ts) = timestamp {
labels.push(Label::num(self.timestamp_key, ts.get(), StringId::ZERO))
}
let pprof_labels: Vec<_> = labels.iter().map(protobuf::Label::from).collect();
if timestamp.is_some() {
labels.pop();
}
let item = protobuf::Sample {
location_ids: Record::from(location_ids.as_slice()),
values: Record::from(values.as_slice()),
// SAFETY: converting &[Label] to &[Field<Label,..>] which is
// safe, because Field is repr(transparent).
labels: unsafe {
&*(pprof_labels.as_slice() as *const [protobuf::Label]
as *const [Record<protobuf::Label, 3, NO_OPT_ZERO>])
},
};
Record::<_, 2, NO_OPT_ZERO>::from(item).encode(writer)?;
}

If it does, the iter will be dropped at the end of the loop, dropping the unconsumed TrimmedObservation's which will fail the assertion and as such burry the anyhow::Result and we'll not know what happened to return early and crash the customer application.

Additional Notes

Anything else we should know when reviewing?

How to test the change?

$ cargo test reproduce_crash_with_anyhow_bailout

@codecov-commenter
Copy link

codecov-commenter commented Nov 21, 2025

Codecov Report

❌ Patch coverage is 90.32258% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.21%. Comparing base (8e56742) to head (214251e).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1362      +/-   ##
==========================================
+ Coverage   71.19%   71.21%   +0.01%     
==========================================
  Files         392      392              
  Lines       62677    62742      +65     
==========================================
+ Hits        44626    44679      +53     
- Misses      18051    18063      +12     
Components Coverage Δ
libdd-crashtracker 59.90% <ø> (ø)
libdd-crashtracker-ffi 15.31% <ø> (ø)
libdd-alloc 98.73% <ø> (ø)
libdd-data-pipeline 86.00% <ø> (ø)
libdd-data-pipeline-ffi 77.63% <ø> (ø)
libdd-common 80.93% <ø> (ø)
libdd-common-ffi 73.90% <ø> (ø)
libdd-telemetry 60.02% <ø> (ø)
libdd-telemetry-ffi 21.24% <ø> (ø)
libdd-dogstatsd-client 83.75% <ø> (ø)
datadog-ipc 82.61% <ø> (-0.11%) ⬇️
libdd-profiling 79.75% <90.32%> (+0.07%) ⬆️
libdd-profiling-ffi 62.13% <ø> (ø)
datadog-sidecar 36.98% <ø> (ø)
datdog-sidecar-ffi 16.40% <ø> (ø)
spawn-worker 55.18% <ø> (ø)
libdd-tinybytes 92.44% <ø> (ø)
libdd-trace-normalization 98.24% <ø> (ø)
datadog-trace-obfuscation 94.17% <ø> (ø)
libdd-trace-protobuf 59.65% <ø> (ø)
libdd-trace-utils 90.25% <ø> (ø)
datadog-tracer-flare 62.06% <ø> (ø)
libdd-log 75.57% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@idanoo
Copy link

idanoo commented Nov 23, 2025

We are seeing this error occur sporadically since updating dd-tracer-php to 1.14.0, and are unable to track down the root cause or easily replicate. Following.

thread 'ddprof_upload' panicked at /go/src/github.com/DataDog/apm-reliability/dd-trace-php/.cache/cargo/git/checkouts/libdatadog-50fe3e265482f8ce/aa2396e/datadog-profiling/src/internal/observation/trimmed_observation.rs:114:9:
assertion `left == right` failed: Dropped TrimmedObservation that still owned data.
left: 0x63c7883ebf80
right: 0x0
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

@realFlowControl
Copy link
Member Author

Hey @idanoo,
thanks for reaching out. The crash you are seeing is exactly what this PR fixes. I'm gonna add some tests and make sure we ship this as part of dd-trace-php.

@realFlowControl realFlowControl marked this pull request as ready for review November 24, 2025 11:04
@realFlowControl realFlowControl requested a review from a team as a code owner November 24, 2025 11:04
@realFlowControl realFlowControl force-pushed the florian/fix-observations-iter branch 2 times, most recently from 6748986 to a75421d Compare November 24, 2025 11:14
@pr-commenter
Copy link

pr-commenter bot commented Nov 24, 2025

Benchmarks

Comparison

Benchmark execution time: 2025-11-24 11:28:24

Comparing candidate commit a75421d in PR branch florian/fix-observations-iter with baseline commit 46f8578 in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 55 metrics, 2 unstable metrics.

Candidate

Candidate benchmark details

Group 1

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz a75421d 1763982878 florian/fix-observations-iter
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
concentrator/add_spans_to_concentrator execution_time 10.612ms 10.641ms ± 0.016ms 10.639ms ± 0.010ms 10.651ms 10.671ms 10.686ms 10.690ms 0.48% 0.728 0.235 0.15% 0.001ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
concentrator/add_spans_to_concentrator execution_time [10.639ms; 10.643ms] or [-0.021%; +0.021%] None None None

Group 2

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz a75421d 1763982878 florian/fix-observations-iter
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
normalization/normalize_trace/test_trace execution_time 250.464ns 261.730ns ± 12.594ns 255.836ns ± 3.615ns 266.341ns 291.824ns 294.402ns 294.640ns 15.17% 1.403 0.655 4.80% 0.891ns 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
normalization/normalize_trace/test_trace execution_time [259.984ns; 263.475ns] or [-0.667%; +0.667%] None None None

Group 3

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz a75421d 1763982878 florian/fix-observations-iter
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
credit_card/is_card_number/ execution_time 3.899µs 3.916µs ± 0.003µs 3.916µs ± 0.002µs 3.918µs 3.922µs 3.923µs 3.924µs 0.21% -0.459 3.440 0.08% 0.000µs 1 200
credit_card/is_card_number/ throughput 254821631.343op/s 255344652.942op/s ± 205152.038op/s 255352798.035op/s ± 145185.442op/s 255498584.129op/s 255613227.470op/s 255646117.689op/s 256476843.676op/s 0.44% 0.471 3.504 0.08% 14506.440op/s 1 200
credit_card/is_card_number/ 3782-8224-6310-005 execution_time 77.879µs 78.313µs ± 0.520µs 78.068µs ± 0.135µs 78.485µs 79.443µs 79.970µs 80.624µs 3.28% 1.879 3.491 0.66% 0.037µs 1 200
credit_card/is_card_number/ 3782-8224-6310-005 throughput 12403183.703op/s 12769837.219op/s ± 83735.803op/s 12809400.179op/s ± 22178.336op/s 12826198.152op/s 12834847.445op/s 12839118.612op/s 12840457.714op/s 0.24% -1.841 3.283 0.65% 5921.015op/s 1 200
credit_card/is_card_number/ 378282246310005 execution_time 71.426µs 71.697µs ± 0.456µs 71.537µs ± 0.048µs 71.601µs 72.885µs 73.679µs 74.079µs 3.55% 3.142 9.814 0.63% 0.032µs 1 200
credit_card/is_card_number/ 378282246310005 throughput 13499024.213op/s 13948103.742op/s ± 87027.669op/s 13978749.506op/s ± 9327.116op/s 13986577.083op/s 13993166.370op/s 13998773.539op/s 14000571.223op/s 0.16% -3.106 9.545 0.62% 6153.785op/s 1 200
credit_card/is_card_number/37828224631 execution_time 3.895µs 3.914µs ± 0.003µs 3.914µs ± 0.001µs 3.915µs 3.918µs 3.920µs 3.924µs 0.26% -1.643 17.843 0.06% 0.000µs 1 200
credit_card/is_card_number/37828224631 throughput 254827306.875op/s 255471438.750op/s ± 165820.091op/s 255484964.713op/s ± 76820.115op/s 255560331.410op/s 255649566.501op/s 255694384.240op/s 256764513.878op/s 0.50% 1.676 18.106 0.06% 11725.251op/s 1 200
credit_card/is_card_number/378282246310005 execution_time 68.240µs 68.535µs ± 0.380µs 68.353µs ± 0.059µs 68.611µs 69.228µs 69.932µs 70.963µs 3.82% 2.732 10.025 0.55% 0.027µs 1 200
credit_card/is_card_number/378282246310005 throughput 14091939.092op/s 14591626.920op/s ± 79761.667op/s 14629941.639op/s ± 12548.213op/s 14637936.775op/s 14647072.985op/s 14650932.107op/s 14654063.235op/s 0.16% -2.659 9.389 0.55% 5640.002op/s 1 200
credit_card/is_card_number/37828224631000521389798 execution_time 45.453µs 45.671µs ± 0.082µs 45.684µs ± 0.061µs 45.722µs 45.792µs 45.838µs 45.846µs 0.36% -0.287 -0.253 0.18% 0.006µs 1 200
credit_card/is_card_number/37828224631000521389798 throughput 21811971.246op/s 21895897.939op/s ± 39348.244op/s 21889596.969op/s ± 29031.675op/s 21925327.045op/s 21956228.585op/s 21994891.221op/s 22000940.314op/s 0.51% 0.296 -0.245 0.18% 2782.341op/s 1 200
credit_card/is_card_number/x371413321323331 execution_time 6.550µs 6.622µs ± 0.017µs 6.625µs ± 0.010µs 6.634µs 6.641µs 6.645µs 6.647µs 0.33% -1.189 1.580 0.26% 0.001µs 1 200
credit_card/is_card_number/x371413321323331 throughput 150446803.125op/s 151023716.981op/s ± 396724.684op/s 150940435.285op/s ± 221456.803op/s 151186771.158op/s 151781235.574op/s 152182067.572op/s 152673543.977op/s 1.15% 1.206 1.644 0.26% 28052.671op/s 1 200
credit_card/is_card_number_no_luhn/ execution_time 3.898µs 3.915µs ± 0.003µs 3.915µs ± 0.002µs 3.917µs 3.920µs 3.922µs 3.923µs 0.20% -0.805 5.827 0.07% 0.000µs 1 200
credit_card/is_card_number_no_luhn/ throughput 254890467.486op/s 255396994.105op/s ± 184059.551op/s 255398762.710op/s ± 119449.844op/s 255517183.219op/s 255642043.956op/s 255760329.463op/s 256518127.633op/s 0.44% 0.820 5.918 0.07% 13014.976op/s 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time 65.573µs 65.714µs ± 0.057µs 65.711µs ± 0.046µs 65.758µs 65.804µs 65.844µs 65.882µs 0.26% 0.210 -0.579 0.09% 0.004µs 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput 15178554.865op/s 15217419.293op/s ± 13234.788op/s 15218134.810op/s ± 10725.068op/s 15228169.867op/s 15236350.147op/s 15242758.336op/s 15250095.587op/s 0.21% -0.206 -0.583 0.09% 935.841op/s 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time 53.371µs 53.435µs ± 0.036µs 53.431µs ± 0.023µs 53.455µs 53.503µs 53.536µs 53.552µs 0.23% 0.752 0.520 0.07% 0.003µs 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 throughput 18673409.224op/s 18714435.452op/s ± 12660.320op/s 18715783.653op/s ± 8054.653op/s 18723545.212op/s 18731328.048op/s 18736069.645op/s 18736668.188op/s 0.11% -0.748 0.511 0.07% 895.220op/s 1 200
credit_card/is_card_number_no_luhn/37828224631 execution_time 3.893µs 3.916µs ± 0.003µs 3.916µs ± 0.002µs 3.918µs 3.921µs 3.922µs 3.924µs 0.21% -1.518 12.150 0.08% 0.000µs 1 200
credit_card/is_card_number_no_luhn/37828224631 throughput 254841006.253op/s 255369177.968op/s ± 203720.549op/s 255385059.974op/s ± 130126.273op/s 255506712.379op/s 255610229.191op/s 255675518.496op/s 256845552.454op/s 0.57% 1.547 12.384 0.08% 14405.218op/s 1 200
credit_card/is_card_number_no_luhn/378282246310005 execution_time 50.154µs 50.212µs ± 0.033µs 50.208µs ± 0.021µs 50.230µs 50.268µs 50.321µs 50.354µs 0.29% 1.120 2.240 0.07% 0.002µs 1 200
credit_card/is_card_number_no_luhn/378282246310005 throughput 19859243.639op/s 19915530.470op/s ± 13136.959op/s 19916973.110op/s ± 8343.283op/s 19925265.311op/s 19932659.106op/s 19936320.523op/s 19938742.202op/s 0.11% -1.115 2.217 0.07% 928.923op/s 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time 45.476µs 45.719µs ± 0.098µs 45.726µs ± 0.069µs 45.791µs 45.865µs 45.943µs 45.973µs 0.54% -0.118 -0.205 0.21% 0.007µs 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput 21752059.890op/s 21872710.647op/s ± 46953.421op/s 21869567.438op/s ± 33223.927op/s 21905283.007op/s 21948064.924op/s 21980263.880op/s 21989861.569op/s 0.55% 0.129 -0.203 0.21% 3320.108op/s 1 200
credit_card/is_card_number_no_luhn/x371413321323331 execution_time 6.555µs 6.618µs ± 0.017µs 6.618µs ± 0.013µs 6.633µs 6.640µs 6.645µs 6.645µs 0.42% -0.744 0.659 0.25% 0.001µs 1 200
credit_card/is_card_number_no_luhn/x371413321323331 throughput 150480887.386op/s 151098615.454op/s ± 383588.757op/s 151107572.062op/s ± 304946.694op/s 151280605.926op/s 151727695.606op/s 152242696.994op/s 152545811.130op/s 0.95% 0.760 0.706 0.25% 27123.821op/s 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
credit_card/is_card_number/ execution_time [3.916µs; 3.917µs] or [-0.011%; +0.011%] None None None
credit_card/is_card_number/ throughput [255316220.843op/s; 255373085.041op/s] or [-0.011%; +0.011%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 execution_time [78.241µs; 78.385µs] or [-0.092%; +0.092%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 throughput [12758232.242op/s; 12781442.196op/s] or [-0.091%; +0.091%] None None None
credit_card/is_card_number/ 378282246310005 execution_time [71.634µs; 71.760µs] or [-0.088%; +0.088%] None None None
credit_card/is_card_number/ 378282246310005 throughput [13936042.544op/s; 13960164.940op/s] or [-0.086%; +0.086%] None None None
credit_card/is_card_number/37828224631 execution_time [3.914µs; 3.915µs] or [-0.009%; +0.009%] None None None
credit_card/is_card_number/37828224631 throughput [255448457.680op/s; 255494419.820op/s] or [-0.009%; +0.009%] None None None
credit_card/is_card_number/378282246310005 execution_time [68.482µs; 68.587µs] or [-0.077%; +0.077%] None None None
credit_card/is_card_number/378282246310005 throughput [14580572.720op/s; 14602681.120op/s] or [-0.076%; +0.076%] None None None
credit_card/is_card_number/37828224631000521389798 execution_time [45.659µs; 45.682µs] or [-0.025%; +0.025%] None None None
credit_card/is_card_number/37828224631000521389798 throughput [21890444.651op/s; 21901351.228op/s] or [-0.025%; +0.025%] None None None
credit_card/is_card_number/x371413321323331 execution_time [6.619µs; 6.624µs] or [-0.036%; +0.036%] None None None
credit_card/is_card_number/x371413321323331 throughput [150968734.756op/s; 151078699.207op/s] or [-0.036%; +0.036%] None None None
credit_card/is_card_number_no_luhn/ execution_time [3.915µs; 3.916µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/ throughput [255371485.221op/s; 255422502.988op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time [65.706µs; 65.722µs] or [-0.012%; +0.012%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput [15215585.079op/s; 15219253.508op/s] or [-0.012%; +0.012%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time [53.430µs; 53.440µs] or [-0.009%; +0.009%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 throughput [18712680.854op/s; 18716190.051op/s] or [-0.009%; +0.009%] None None None
credit_card/is_card_number_no_luhn/37828224631 execution_time [3.915µs; 3.916µs] or [-0.011%; +0.011%] None None None
credit_card/is_card_number_no_luhn/37828224631 throughput [255340944.259op/s; 255397411.677op/s] or [-0.011%; +0.011%] None None None
credit_card/is_card_number_no_luhn/378282246310005 execution_time [50.207µs; 50.217µs] or [-0.009%; +0.009%] None None None
credit_card/is_card_number_no_luhn/378282246310005 throughput [19913709.814op/s; 19917351.126op/s] or [-0.009%; +0.009%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time [45.706µs; 45.733µs] or [-0.030%; +0.030%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput [21866203.355op/s; 21879217.940op/s] or [-0.030%; +0.030%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 execution_time [6.616µs; 6.621µs] or [-0.035%; +0.035%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 throughput [151045453.742op/s; 151151777.167op/s] or [-0.035%; +0.035%] None None None

Group 4

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz a75421d 1763982878 florian/fix-observations-iter
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... execution_time 533.994µs 534.831µs ± 0.519µs 534.760µs ± 0.294µs 535.109µs 535.645µs 536.088µs 538.709µs 0.74% 2.392 14.236 0.10% 0.037µs 1 200
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput 1856288.138op/s 1869749.958op/s ± 1811.273op/s 1869997.447op/s ± 1028.085op/s 1870952.483op/s 1872134.306op/s 1872430.374op/s 1872679.392op/s 0.14% -2.362 13.947 0.10% 128.076op/s 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time 380.276µs 381.120µs ± 0.348µs 381.126µs ± 0.228µs 381.331µs 381.748µs 381.925µs 382.066µs 0.25% 0.173 -0.312 0.09% 0.025µs 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput 2617350.026op/s 2623845.388op/s ± 2395.091op/s 2623803.603op/s ± 1571.880op/s 2625561.335op/s 2627674.461op/s 2628355.309op/s 2629671.383op/s 0.22% -0.168 -0.315 0.09% 169.359op/s 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time 194.781µs 195.349µs ± 0.234µs 195.339µs ± 0.155µs 195.480µs 195.749µs 195.894µs 196.035µs 0.36% 0.216 -0.054 0.12% 0.017µs 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput 5101141.542op/s 5119054.565op/s ± 6130.007op/s 5119310.585op/s ± 4062.457op/s 5123529.304op/s 5127741.506op/s 5133633.166op/s 5133968.198op/s 0.29% -0.210 -0.057 0.12% 433.457op/s 1 200
normalization/normalize_service/normalize_service/[empty string] execution_time 36.978µs 37.192µs ± 0.077µs 37.194µs ± 0.049µs 37.241µs 37.316µs 37.378µs 37.399µs 0.55% -0.067 0.024 0.21% 0.005µs 1 200
normalization/normalize_service/normalize_service/[empty string] throughput 26738657.912op/s 26887442.632op/s ± 55903.240op/s 26885981.248op/s ± 35709.587op/s 26923467.506op/s 26987740.445op/s 27018796.401op/s 27042877.111op/s 0.58% 0.080 0.025 0.21% 3952.956op/s 1 200
normalization/normalize_service/normalize_service/test_ASCII execution_time 44.902µs 45.091µs ± 0.190µs 45.062µs ± 0.150µs 45.233µs 45.351µs 45.361µs 46.637µs 3.50% 2.816 19.842 0.42% 0.013µs 1 200
normalization/normalize_service/normalize_service/test_ASCII throughput 21442120.807op/s 22177597.168op/s ± 92422.799op/s 22191764.711op/s ± 74220.605op/s 22265345.524op/s 22269775.616op/s 22270592.905op/s 22270915.792op/s 0.36% -2.647 18.028 0.42% 6535.279op/s 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... execution_time [534.759µs; 534.903µs] or [-0.013%; +0.013%] None None None
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput [1869498.933op/s; 1870000.983op/s] or [-0.013%; +0.013%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time [381.072µs; 381.169µs] or [-0.013%; +0.013%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput [2623513.451op/s; 2624177.324op/s] or [-0.013%; +0.013%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time [195.316µs; 195.381µs] or [-0.017%; +0.017%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput [5118205.006op/s; 5119904.125op/s] or [-0.017%; +0.017%] None None None
normalization/normalize_service/normalize_service/[empty string] execution_time [37.182µs; 37.203µs] or [-0.029%; +0.029%] None None None
normalization/normalize_service/normalize_service/[empty string] throughput [26879694.980op/s; 26895190.283op/s] or [-0.029%; +0.029%] None None None
normalization/normalize_service/normalize_service/test_ASCII execution_time [45.065µs; 45.118µs] or [-0.058%; +0.058%] None None None
normalization/normalize_service/normalize_service/test_ASCII throughput [22164788.257op/s; 22190406.079op/s] or [-0.058%; +0.058%] None None None

Group 5

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz a75421d 1763982878 florian/fix-observations-iter
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
benching serializing traces from their internal representation to msgpack execution_time 14.807ms 14.880ms ± 0.035ms 14.877ms ± 0.015ms 14.890ms 14.949ms 15.012ms 15.068ms 1.29% 2.006 6.325 0.24% 0.002ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
benching serializing traces from their internal representation to msgpack execution_time [14.875ms; 14.885ms] or [-0.033%; +0.033%] None None None

Group 6

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz a75421d 1763982878 florian/fix-observations-iter
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
sql/obfuscate_sql_string execution_time 85.934µs 86.080µs ± 0.241µs 86.057µs ± 0.038µs 86.094µs 86.199µs 86.343µs 89.325µs 3.80% 12.252 162.025 0.28% 0.017µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
sql/obfuscate_sql_string execution_time [86.047µs; 86.114µs] or [-0.039%; +0.039%] None None None

Group 7

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz a75421d 1763982878 florian/fix-observations-iter
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
redis/obfuscate_redis_string execution_time 33.987µs 34.386µs ± 0.648µs 34.115µs ± 0.041µs 34.156µs 35.633µs 35.668µs 38.598µs 13.14% 2.493 8.298 1.88% 0.046µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
redis/obfuscate_redis_string execution_time [34.296µs; 34.476µs] or [-0.261%; +0.261%] None None None

Group 8

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz a75421d 1763982878 florian/fix-observations-iter
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
receiver_entry_point/report/2597 execution_time 6.160ms 6.409ms ± 0.068ms 6.424ms ± 0.020ms 6.443ms 6.471ms 6.538ms 6.597ms 2.69% -1.568 3.397 1.06% 0.005ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
receiver_entry_point/report/2597 execution_time [6.399ms; 6.418ms] or [-0.148%; +0.148%] None None None

Group 9

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz a75421d 1763982878 florian/fix-observations-iter
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
benching string interning on wordpress profile execution_time 158.799µs 159.979µs ± 0.402µs 159.877µs ± 0.208µs 160.250µs 160.621µs 160.987µs 162.715µs 1.77% 1.879 9.786 0.25% 0.028µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
benching string interning on wordpress profile execution_time [159.924µs; 160.035µs] or [-0.035%; +0.035%] None None None

Group 10

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz a75421d 1763982878 florian/fix-observations-iter
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
tags/replace_trace_tags execution_time 2.338µs 2.392µs ± 0.021µs 2.394µs ± 0.013µs 2.400µs 2.438µs 2.446µs 2.455µs 2.57% 0.484 0.735 0.87% 0.001µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
tags/replace_trace_tags execution_time [2.389µs; 2.395µs] or [-0.121%; +0.121%] None None None

Group 11

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz a75421d 1763982878 florian/fix-observations-iter
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
sdk_test_data/rules-based execution_time 144.991µs 147.385µs ± 1.581µs 147.181µs ± 0.627µs 147.821µs 149.288µs 152.677µs 162.200µs 10.20% 4.929 39.469 1.07% 0.112µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
sdk_test_data/rules-based execution_time [147.165µs; 147.604µs] or [-0.149%; +0.149%] None None None

Group 12

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz a75421d 1763982878 florian/fix-observations-iter
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... execution_time 205.703µs 206.339µs ± 0.316µs 206.283µs ± 0.149µs 206.450µs 207.049µs 207.257µs 207.690µs 0.68% 1.361 2.755 0.15% 0.022µs 1 200
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput 4814872.073op/s 4846409.946op/s ± 7398.305op/s 4847709.850op/s ± 3509.486op/s 4850689.390op/s 4855643.937op/s 4858108.944op/s 4861370.147op/s 0.28% -1.348 2.710 0.15% 523.139op/s 1 200
normalization/normalize_name/normalize_name/bad-name execution_time 18.189µs 18.250µs ± 0.040µs 18.243µs ± 0.018µs 18.264µs 18.305µs 18.371µs 18.542µs 1.64% 3.008 16.527 0.22% 0.003µs 1 200
normalization/normalize_name/normalize_name/bad-name throughput 53932959.066op/s 54794799.767op/s ± 118559.513op/s 54815722.439op/s ± 53830.824op/s 54862531.899op/s 54922545.024op/s 54959464.997op/s 54977165.996op/s 0.29% -2.947 15.970 0.22% 8383.424op/s 1 200
normalization/normalize_name/normalize_name/good execution_time 10.531µs 10.636µs ± 0.076µs 10.624µs ± 0.041µs 10.667µs 10.808µs 10.885µs 10.948µs 3.06% 1.496 2.692 0.72% 0.005µs 1 200
normalization/normalize_name/normalize_name/good throughput 91339100.944op/s 94024389.940op/s ± 667341.992op/s 94130462.849op/s ± 362576.630op/s 94488302.589op/s 94783095.083op/s 94938143.850op/s 94962011.571op/s 0.88% -1.444 2.493 0.71% 47188.205op/s 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... execution_time [206.295µs; 206.383µs] or [-0.021%; +0.021%] None None None
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput [4845384.612op/s; 4847435.280op/s] or [-0.021%; +0.021%] None None None
normalization/normalize_name/normalize_name/bad-name execution_time [18.244µs; 18.256µs] or [-0.030%; +0.030%] None None None
normalization/normalize_name/normalize_name/bad-name throughput [54778368.559op/s; 54811230.975op/s] or [-0.030%; +0.030%] None None None
normalization/normalize_name/normalize_name/good execution_time [10.626µs; 10.647µs] or [-0.099%; +0.099%] None None None
normalization/normalize_name/normalize_name/good throughput [93931902.758op/s; 94116877.122op/s] or [-0.098%; +0.098%] None None None

Group 13

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz a75421d 1763982878 florian/fix-observations-iter
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
write only interface execution_time 1.206µs 3.169µs ± 1.431µs 2.997µs ± 0.025µs 3.018µs 3.354µs 13.759µs 15.161µs 405.91% 7.521 57.104 45.03% 0.101µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
write only interface execution_time [2.971µs; 3.368µs] or [-6.256%; +6.256%] None None None

Group 14

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz a75421d 1763982878 florian/fix-observations-iter
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
benching deserializing traces from msgpack to their internal representation execution_time 62.347ms 62.935ms ± 2.334ms 62.604ms ± 0.113ms 62.719ms 63.361ms 76.247ms 85.241ms 36.16% 8.298 69.481 3.70% 0.165ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
benching deserializing traces from msgpack to their internal representation execution_time [62.611ms; 63.258ms] or [-0.514%; +0.514%] None None None

Group 15

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz a75421d 1763982878 florian/fix-observations-iter
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
single_flag_killswitch/rules-based execution_time 189.255ns 192.022ns ± 2.374ns 191.685ns ± 1.471ns 192.961ns 196.709ns 199.964ns 205.542ns 7.23% 1.811 5.451 1.23% 0.168ns 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
single_flag_killswitch/rules-based execution_time [191.693ns; 192.351ns] or [-0.171%; +0.171%] None None None

Group 16

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz a75421d 1763982878 florian/fix-observations-iter
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
ip_address/quantize_peer_ip_address_benchmark execution_time 4.989µs 5.075µs ± 0.051µs 5.076µs ± 0.044µs 5.106µs 5.156µs 5.162µs 5.166µs 1.76% 0.283 -1.262 1.01% 0.004µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
ip_address/quantize_peer_ip_address_benchmark execution_time [5.068µs; 5.082µs] or [-0.140%; +0.140%] None None None

Group 17

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz a75421d 1763982878 florian/fix-observations-iter
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
two way interface execution_time 17.902µs 25.339µs ± 9.271µs 18.203µs ± 0.173µs 33.250µs 42.180µs 48.995µs 68.258µs 274.99% 1.031 0.925 36.50% 0.656µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
two way interface execution_time [24.054µs; 26.624µs] or [-5.071%; +5.071%] None None None

Baseline

Omitted due to size.

@dd-octo-sts
Copy link

dd-octo-sts bot commented Nov 24, 2025

Artifact Size Benchmark Report

aarch64-alpine-linux-musl
Artifact Baseline Commit Change
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.so 7.38 MB 7.38 MB 0% (0 B) 👌
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.a 85.96 MB 85.96 MB -0% (-4.96 KB) 👌
aarch64-apple-darwin
Artifact Baseline Commit Change
/aarch64-apple-darwin/lib/libdatadog_profiling.a 57.99 MB 57.99 MB --.01% (-8.33 KB) 💪
/aarch64-apple-darwin/lib/libdatadog_profiling.dylib 8.43 MB 8.43 MB +0% (+272 B) 👌
aarch64-unknown-linux-gnu
Artifact Baseline Commit Change
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so 9.53 MB 9.53 MB +0% (+360 B) 👌
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.a 99.70 MB 99.69 MB -0% (-7.09 KB) 👌
libdatadog-x64-windows
Artifact Baseline Commit Change
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.dll 19.57 MB 19.57 MB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.lib 69.82 KB 69.82 KB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.pdb 138.53 MB 138.52 MB -0% (-8.00 KB) 👌
/libdatadog-x64-windows/debug/static/datadog_profiling_ffi.lib 735.58 MB 735.57 MB -0% (-8.59 KB) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.dll 6.34 MB 6.34 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.lib 69.82 KB 69.82 KB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.pdb 19.67 MB 19.67 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/static/datadog_profiling_ffi.lib 38.64 MB 38.64 MB -0% (-200 B) 👌
libdatadog-x86-windows
Artifact Baseline Commit Change
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.dll 16.70 MB 16.70 MB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.lib 70.90 KB 70.90 KB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.pdb 141.11 MB 141.10 MB -0% (-8.00 KB) 👌
/libdatadog-x86-windows/debug/static/datadog_profiling_ffi.lib 724.31 MB 724.31 MB -0% (-9.25 KB) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.dll 4.87 MB 4.87 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.lib 70.90 KB 70.90 KB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.pdb 20.90 MB 20.90 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/static/datadog_profiling_ffi.lib 36.39 MB 36.39 MB +0% (+344 B) 👌
x86_64-alpine-linux-musl
Artifact Baseline Commit Change
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.a 74.32 MB 74.31 MB -0% (-7.32 KB) 👌
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.so 8.85 MB 8.85 MB 0% (0 B) 👌
x86_64-apple-darwin
Artifact Baseline Commit Change
/x86_64-apple-darwin/lib/libdatadog_profiling.a 59.35 MB 59.35 MB --.01% (-8.29 KB) 💪
/x86_64-apple-darwin/lib/libdatadog_profiling.dylib 9.47 MB 9.47 MB +0% (+280 B) 👌
x86_64-unknown-linux-gnu
Artifact Baseline Commit Change
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.a 93.93 MB 93.92 MB -0% (-6.64 KB) 👌
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so 10.28 MB 10.28 MB +0% (+296 B) 👌

@realFlowControl realFlowControl force-pushed the florian/fix-observations-iter branch from a75421d to 214251e Compare November 24, 2025 17:06
@realFlowControl
Copy link
Member Author

/merge

@dd-devflow-routing-codex
Copy link

dd-devflow-routing-codex bot commented Nov 24, 2025

View all feedbacks in Devflow UI.

2025-11-24 17:11:46 UTC ℹ️ Start processing command /merge


2025-11-24 17:11:52 UTC ℹ️ MergeQueue: waiting for PR to be ready

This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
It will be added to the queue as soon as checks pass and/or get approvals.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2025-11-24 17:31:23 UTC ℹ️ MergeQueue: merge request added to the queue

The expected merge time in main is approximately 35m (p90).


2025-11-24 17:55:52 UTC ℹ️ MergeQueue: This merge request was merged

@dd-mergequeue dd-mergequeue bot merged commit 970baa6 into main Nov 24, 2025
37 checks passed
@dd-mergequeue dd-mergequeue bot deleted the florian/fix-observations-iter branch November 24, 2025 17:55
realFlowControl added a commit that referenced this pull request Nov 24, 2025
consume observations on drop of iterator

add test for anyhow bailout

`upscale_values` can not fail

Add missing comment

Co-authored-by: florian.engelhardt <florian.engelhardt@datadoghq.com>
@realFlowControl realFlowControl changed the title consume observations on drop of iterator fix: Consume Observations on drop of iterator Nov 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants