You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
⚠️1 issue(s) found, showing only errors (advisories, bans, sources)
📦 libdd-capabilities-impl - 1 error(s)
Show output
error[unsound]: Rand is unsound with a custom logger using `rand::rng()`
┌─ /home/runner/work/libdatadog/libdatadog/Cargo.lock:68:1
│
68 │ rand 0.8.5 registry+https://github.com/rust-lang/crates.io-index
│ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ unsound advisory detected
│
├ ID: RUSTSEC-2026-0097
├ Advisory: https://rustsec.org/advisories/RUSTSEC-2026-0097
├ It has been reported (by @lopopolo) that the `rand` library is [unsound](https://rust-lang.github.io/unsafe-code-guidelines/glossary.html#soundness-of-code--of-a-library) (i.e. that safe code using the public API can cause Undefined Behaviour) when all the following conditions are met:
- The `log` and `thread_rng` features are enabled
- A [custom logger](https://docs.rs/log/latest/log/#implementing-a-logger) is defined
- The custom logger accesses `rand::rng()` (previously `rand::thread_rng()`) and calls any `TryRng` (previously `RngCore`) methods on `ThreadRng`
- The `ThreadRng` (attempts to) reseed while called from the custom logger (this happens every 64 kB of generated data)
- Trace-level logging is enabled or warn-level logging is enabled and the random source (the `getrandom` crate) is unable to provide a new seed
`TryRng` (previously `RngCore`) methods for `ThreadRng` use `unsafe` code to cast `*mut BlockRng<ReseedingCore>` to `&mut BlockRng<ReseedingCore>`. When all the above conditions are met this results in an aliased mutable reference, violating the Stacked Borrows rules. Miri is able to detect this violation in sample code. Since construction of [aliased mutable references is Undefined Behaviour](https://doc.rust-lang.org/stable/nomicon/references.html), the behaviour of optimized builds is hard to predict.
├ Announcement: https://github.com/rust-random/rand/pull/1763
├ Solution: Upgrade to >=0.10.1 OR <0.10.0, >=0.9.3 OR <0.9.0, >=0.8.6 (try `cargo update -p rand`)
├ rand v0.8.5
└── (dev) libdd-common v5.1.0
└── libdd-capabilities-impl v3.0.0
advisories FAILED, bans ok, sources ok
Comparing candidate commit d794743 in PR branch jwiriath/file-caps with baseline commit a10f667 in branch main.
Found 4 performance improvements and 25 performance regressions! Performance is the same for 113 metrics, 0 unstable metrics.
Explanation
This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:
🟩 = significantly better candidate vs. baseline
🟥 = significantly worse candidate vs. baseline
We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.
If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.
Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.
More details about the CI and significant changes
You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.
CIs of the difference of means are often centered around 0%, because often changes are not that big:
---------------------------------(------|---^--------)-------------------------------->
-0.6% 0% 0.3% +1.2%
| | |
lower bound of the CI --' | |
sample mean (center of the CI) -------------' |
upper bound of the CI ----------------------'
As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).
For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:
----------------------------------------|---------|---(---------^---------)---------->
0% 1% 1.3% 2.2% 3.1%
| | | |
significant impact threshold --------------' | | |
lower bound of CI --------------' | |
sample mean (center of the CI) --------------------------' |
upper bound of CI ----------------------------------'
scenario:otlp/e2e_json/1x1000
🟥 execution_time [+442.161µs; +444.177µs] or [+10.818%; +10.868%]
scenario:otlp/encode_json/1x1000
🟥 execution_time [+433.150µs; +433.762µs] or [+24.351%; +24.386%]
🟥 execution_time [+214.061ns; +215.533ns] or [+6.859%; +6.906%]
scenario:vec_map/contains_key/128
🟥 execution_time [+765.117ns; +771.543ns] or [+5.122%; +5.165%]
🟥 throughput [-420952.138op/s; -417455.188op/s] or [-4.912%; -4.872%]
scenario:vec_map/contains_key/16
🟥 execution_time [+30.980ns; +31.311ns] or [+13.408%; +13.551%]
🟥 throughput [-8271531.112op/s; -8180853.331op/s] or [-11.945%; -11.814%]
scenario:vec_map/contains_key/64
🟥 execution_time [+220.537ns; +228.268ns] or [+5.587%; +5.783%]
🟥 throughput [-885309.460op/s; -857965.677op/s] or [-5.460%; -5.292%]
scenario:vec_map/contains_key/8
🟥 execution_time [+12.462ns; +12.751ns] or [+17.638%; +18.048%]
🟥 throughput [-17325033.506op/s; -16949089.753op/s] or [-15.300%; -14.968%]
scenario:vec_map/get_hit/16
🟩 execution_time [-34.902ns; -34.441ns] or [-14.796%; -14.600%]
🟩 throughput [+11605577.644op/s; +11775429.172op/s] or [+17.110%; +17.360%]
scenario:vec_map/get_hit/8
🟩 execution_time [-6.755ns; -6.678ns] or [-10.421%; -10.302%]
🟩 throughput [+14180547.195op/s; +14354761.999op/s] or [+11.490%; +11.631%]
scenario:vec_map/get_miss/8
🟥 execution_time [+1.816ns; +1.841ns] or [+31.963%; +32.409%]
scenario:vec_map/get_mut/128
🟥 execution_time [+1.917µs; +2.009µs] or [+13.945%; +14.613%]
🟥 throughput [-1192011.657op/s; -1135996.679op/s] or [-12.797%; -12.196%]
scenario:vec_map/get_mut/16
🟥 execution_time [+23.617ns; +33.523ns] or [+8.615%; +12.229%]
🟥 throughput [-6752956.726op/s; -4637900.621op/s] or [-11.460%; -7.870%]
scenario:vec_map/get_mut/64
🟥 execution_time [+414.435ns; +453.188ns] or [+10.661%; +11.658%]
🟥 throughput [-1731018.377op/s; -1579866.485op/s] or [-10.507%; -9.590%]
scenario:vec_map/iter/128
🟥 execution_time [+7.446ns; +7.551ns] or [+7.166%; +7.268%]
🟥 throughput [-83474963.312op/s; -82353492.511op/s] or [-6.776%; -6.685%]
scenario:vec_map/iter/16
🟥 execution_time [+0.590ns; +0.600ns] or [+4.512%; +4.592%]
🟥 throughput [-53750125.825op/s; -52802010.044op/s] or [-4.393%; -4.315%]
scenario:vec_map/iter/8
🟥 execution_time [+0.541ns; +0.547ns] or [+8.080%; +8.171%]
🟥 throughput [-90369196.880op/s; -89303497.117op/s] or [-7.560%; -7.471%]
Benchmark execution time: 2026-07-15 10:59:19
Comparing candidate commit d794743 in PR branch jwiriath/file-caps with baseline commit a10f667 in branch main.
Found 20 performance improvements and 3 performance regressions! Performance is the same for 154 metrics, 10 unstable metrics.
Explanation
This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:
🟩 = significantly better candidate vs. baseline
🟥 = significantly worse candidate vs. baseline
We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.
If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.
Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.
More details about the CI and significant changes
You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.
CIs of the difference of means are often centered around 0%, because often changes are not that big:
---------------------------------(------|---^--------)-------------------------------->
-0.6% 0% 0.3% +1.2%
| | |
lower bound of the CI --' | |
sample mean (center of the CI) -------------' |
upper bound of the CI ----------------------'
As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).
For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:
----------------------------------------|---------|---(---------^---------)---------->
0% 1% 1.3% 2.2% 3.1%
| | | |
significant impact threshold --------------' | | |
lower bound of CI --------------' | |
sample mean (center of the CI) --------------------------' |
upper bound of CI ----------------------------------'
scenario:alloc_free/system/4096
🟥 execution_time [+4.835ns; +4.960ns] or [+5.983%; +6.138%]
🟥 execution_time [+15.770ns; +15.908ns] or [+7.993%; +8.063%]
scenario:receiver_entry_point/report/2644
🟥 execution_time [+162.223µs; +170.110µs] or [+4.444%; +4.660%]
scenario:trace_buffer/4_senders/no_delay
🟩 execution_time [-215.290µs; -186.247µs] or [-8.715%; -7.540%]
🟩 throughput [+121092.047op/s; +141054.833op/s] or [+8.306%; +9.675%]
Candidate
Omitted due to size.
Baseline
Omitted due to size.
Aaalibaba42
changed the title
feat: added file capability
feat: added file capability [APMSP-3780]
Jul 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Added Capability to read, write, and have metadata about files
Motivation
dd-trace-js needing to add info from the
/procin their requests, it's better to have libdatadog drive the callAdditional Notes
Nop
How to test the change?
check, tests, check for wasm32