Skip to content

Conversation

@danielsn
Copy link
Contributor

What does this PR do?

Unifies the headers between common and profiling

Motivation

We had missed some when we implemented our own exporter, this makes sure the two implementations stay in sync.

Additional Notes

Anything else we should know when reviewing?

How to test the change?

Describe here in detail how the change can be validated.

@danielsn danielsn requested review from a team as code owners January 30, 2026 02:32
@github-actions
Copy link

📚 Documentation Check Results

⚠️ 738 documentation warning(s) found

📦 libdd-common - 155 warning(s)

📦 libdd-profiling - 583 warning(s)


Updated: 2026-01-30 02:33:36 UTC | Commit: 2550dc0 | missing-docs job results

@github-actions
Copy link

🔒 Cargo Deny Results

⚠️ 5 issue(s) found, showing only errors (advisories, bans, sources)

📦 libdd-common - ✅ No issues

📦 libdd-profiling - 5 error(s)

Show output
error[vulnerability]: Lenient `hyper` header parsing of `Content-Length` could allow request smuggling
   ┌─ /home/runner/work/libdatadog/libdatadog/Cargo.lock:99:1
   │
99 │ hyper 0.10.16 registry+https://github.com/rust-lang/crates.io-index
   │ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ security vulnerability detected
   │
   ├ ID: RUSTSEC-2021-0078
   ├ Advisory: https://rustsec.org/advisories/RUSTSEC-2021-0078
   ├ `hyper`'s HTTP header parser accepted, according to RFC 7230, illegal contents inside `Content-Length` headers.
     Due to this, upstream HTTP proxies that ignore the header may still forward them along if it chooses to ignore the error.
     
     To be vulnerable, `hyper` must be used as an HTTP/1 server and using an HTTP proxy upstream that ignores the header's contents
     but still forwards it. Due to all the factors that must line up, an attack exploiting this vulnerability is unlikely.
   ├ Announcement: https://github.com/hyperium/hyper/security/advisories/GHSA-f3pg-qwvg-p99c
   ├ Solution: Upgrade to >=0.14.10 (try `cargo update -p hyper`)
   ├ hyper v0.10.16
     ├── iron v0.6.1
     │   └── multipart v0.18.0
     │       └── libdd-profiling v1.0.0
     │           └── (dev) libdd-profiling v1.0.0 (*)
     ├── multipart v0.18.0 (*)
     └── nickel v0.11.0
         └── multipart v0.18.0 (*)

error[vulnerability]: Integer overflow in `hyper`'s parsing of the `Transfer-Encoding` header leads to data loss
   ┌─ /home/runner/work/libdatadog/libdatadog/Cargo.lock:99:1
   │
99 │ hyper 0.10.16 registry+https://github.com/rust-lang/crates.io-index
   │ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ security vulnerability detected
   │
   ├ ID: RUSTSEC-2021-0079
   ├ Advisory: https://rustsec.org/advisories/RUSTSEC-2021-0079
   ├ When decoding chunk sizes that are too large, `hyper`'s code would encounter an integer overflow. Depending on the situation,
     this could lead to data loss from an incorrect total size, or in rarer cases, a request smuggling attack.
     
     To be vulnerable, you must be using `hyper` for any HTTP/1 purpose, including as a client or server, and consumers must send
     requests or responses that specify a chunk size greater than 18 exabytes. For a possible request smuggling attack to be possible,
     any upstream proxies must accept a chunk size greater than 64 bits.
   ├ Announcement: https://github.com/hyperium/hyper/security/advisories/GHSA-5h46-h7hh-c6x9
   ├ Solution: Upgrade to >=0.14.10 (try `cargo update -p hyper`)
   ├ hyper v0.10.16
     ├── iron v0.6.1
     │   └── multipart v0.18.0
     │       └── libdd-profiling v1.0.0
     │           └── (dev) libdd-profiling v1.0.0 (*)
     ├── multipart v0.18.0 (*)
     └── nickel v0.11.0
         └── multipart v0.18.0 (*)

error[vulnerability]: `idna` accepts Punycode labels that do not produce any non-ASCII when decoded
    ┌─ /home/runner/work/libdatadog/libdatadog/Cargo.lock:115:1
    │
115 │ idna 0.1.5 registry+https://github.com/rust-lang/crates.io-index
    │ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ security vulnerability detected
    │
    ├ ID: RUSTSEC-2024-0421
    ├ Advisory: https://rustsec.org/advisories/RUSTSEC-2024-0421
    ├ `idna` 0.5.0 and earlier accepts Punycode labels that do not produce any non-ASCII output, which means that either ASCII labels or the empty root label can be masked such that they appear unequal without IDNA processing or when processed with a different implementation and equal when processed with `idna` 0.5.0 or earlier.
      
      Concretely, `example.org` and `xn--example-.org` become equal after processing by `idna` 0.5.0 or earlier. Also, `example.org.xn--` and `example.org.` become equal after processing by `idna` 0.5.0 or earlier.
      
      In applications using `idna` (but not in `idna` itself) this may be able to lead to privilege escalation when host name comparison is part of a privilege check and the behavior is combined with a client that resolves domains with such labels instead of treating them as errors that preclude DNS resolution / URL fetching and with the attacker managing to introduce a DNS entry (and TLS certificate) for an `xn--`-masked name that turns into the name of the target when processed by `idna` 0.5.0 or earlier.
      
      ## Remedy
      
      Upgrade to `idna` 1.0.3 or later, if depending on `idna` directly, or to `url` 2.5.4 or later, if depending on `idna` via `url`. (This issue was fixed in `idna` 1.0.0, but versions earlier than 1.0.3 are not recommended for other reasons.)
      
      When upgrading, please take a moment to read about [alternative Unicode back ends for `idna`](https://docs.rs/crate/idna_adapter/latest).
      
      If you are using Rust earlier than 1.81 in combination with SQLx 0.8.2 or earlier, please also read an [issue](https://github.com/servo/rust-url/issues/992) about combining them with `url` 2.5.4 and `idna` 1.0.3.
      
      ## Additional information
      
      This issue resulted from `idna` 0.5.0 and earlier implementing the UTS 46 specification literally on this point and the specification having this bug. The specification bug has been fixed in [revision 33 of UTS 46](https://www.unicode.org/reports/tr46/tr46-33.html#Modifications).
      
      ## Acknowledgements
      
      Thanks to kageshiron for recognizing the security implications of this behavior.
    ├ Announcement: https://bugzilla.mozilla.org/show_bug.cgi?id=1887898
    ├ Solution: Upgrade to >=1.0.0 (try `cargo update -p idna`)
    ├ idna v0.1.5
      └── url v1.7.2
          ├── hyper v0.10.16
          │   ├── iron v0.6.1
          │   │   └── multipart v0.18.0
          │   │       └── libdd-profiling v1.0.0
          │   │           └── (dev) libdd-profiling v1.0.0 (*)
          │   ├── multipart v0.18.0 (*)
          │   └── nickel v0.11.0
          │       └── multipart v0.18.0 (*)
          ├── iron v0.6.1 (*)
          ├── nickel v0.11.0 (*)
          └── tiny_http v0.6.4
              └── multipart v0.18.0 (*)

error[unmaintained]: multipart is Unmaintained
    ┌─ /home/runner/work/libdatadog/libdatadog/Cargo.lock:156:1
    │
156 │ multipart 0.18.0 registry+https://github.com/rust-lang/crates.io-index
    │ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ unmaintained advisory detected
    │
    ├ ID: RUSTSEC-2023-0050
    ├ Advisory: https://rustsec.org/advisories/RUSTSEC-2023-0050
    ├ The `multipart` crate is unmaintained. The author has archived the github
      repository.
      
      Alternatives:
      
      - [multer](https://crates.io/crates/multer)
      - [multiparty](https://crates.io/crates/multiparty)
    ├ Solution: No safe upgrade is available!
    ├ multipart v0.18.0
      └── libdd-profiling v1.0.0
          └── (dev) libdd-profiling v1.0.0 (*)

error[vulnerability]: Potential segfault in the time crate
    ┌─ /home/runner/work/libdatadog/libdatadog/Cargo.lock:262:1
    │
262 │ time 0.1.45 registry+https://github.com/rust-lang/crates.io-index
    │ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ security vulnerability detected
    │
    ├ ID: RUSTSEC-2020-0071
    ├ Advisory: https://rustsec.org/advisories/RUSTSEC-2020-0071
    ├ ### Impact
      
      The affected functions set environment variables without synchronization. On Unix-like operating systems, this can crash in multithreaded programs. Programs may segfault due to dereferencing a dangling pointer if an environment variable is read in a different thread than the affected functions. This may occur without the user's knowledge, notably in the Rust standard library or third-party libraries.
      
      The affected functions from time 0.2.7 through 0.2.22 are:
      
      - `time::UtcOffset::local_offset_at`
      - `time::UtcOffset::try_local_offset_at`
      - `time::UtcOffset::current_local_offset`
      - `time::UtcOffset::try_current_local_offset`
      - `time::OffsetDateTime::now_local`
      - `time::OffsetDateTime::try_now_local`
      
      The affected functions in time 0.1 (all versions) are:
      
      - `time::at_utc`
      - `time::at`
      - `time::now`
      - `time::tzset`
      
      Non-Unix targets (including Windows and wasm) are unaffected.
      
      ### Patches
      
      Pending a proper fix, the internal method that determines the local offset has been modified to always return `None` on the affected operating systems. This has the effect of returning an `Err` on the `try_*` methods and `UTC` on the non-`try_*` methods.
      
      Users and library authors with time in their dependency tree should perform `cargo update`, which will pull in the updated, unaffected code.
      
      Users of time 0.1 do not have a patch and should upgrade to an unaffected version: time 0.2.23 or greater or the 0.3 series.
      
      ### Workarounds
      
      A possible workaround for crates affected through the transitive dependency in `chrono`, is to avoid using the default `oldtime` feature dependency of the `chrono` crate by disabling its `default-features` and manually specifying the required features instead.
      
      #### Examples:
      
      `Cargo.toml`:  
      
      ```toml
      chrono = { version = "0.4", default-features = false, features = ["serde"] }
      ```
      
      ```toml
      chrono = { version = "0.4.22", default-features = false, features = ["clock"] }
      ```
      
      Commandline:  
      
      ```bash
      cargo add chrono --no-default-features -F clock
      ```
      
      Sources:  
       - [chronotope/chrono#602 (comment)](https://github.com/chronotope/chrono/issues/602#issuecomment-1242149249)  
       - [vityafx/serde-aux#21](https://github.com/vityafx/serde-aux/issues/21)
    ├ Announcement: https://github.com/time-rs/time/issues/293
    ├ Solution: Upgrade to >=0.2.23 (try `cargo update -p time`)
    ├ time v0.1.45
      ├── hyper v0.10.16
      │   ├── iron v0.6.1
      │   │   └── multipart v0.18.0
      │   │       └── libdd-profiling v1.0.0
      │   │           └── (dev) libdd-profiling v1.0.0 (*)
      │   ├── multipart v0.18.0 (*)
      │   └── nickel v0.11.0
      │       └── multipart v0.18.0 (*)
      └── nickel v0.11.0 (*)

advisories FAILED, bans ok, sources ok

Updated: 2026-01-30 02:36:51 UTC | Commit: 2550dc0 | dependency-check job results

@pr-commenter
Copy link

pr-commenter bot commented Jan 30, 2026

Benchmarks

Comparison

Benchmark execution time: 2026-01-30 02:45:28

Comparing candidate commit e677049 in PR branch dsn/fix-headers with baseline commit 488418a in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 57 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 e677049 1769740134 dsn/fix-headers
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.687µs 34.303µs ± 1.095µs 33.791µs ± 0.042µs 33.880µs 36.664µs 36.700µs 37.453µs 10.84% 1.694 0.940 3.19% 0.077µ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.151µs; 34.455µs] or [-0.443%; +0.443%] None None None

Group 2

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz e677049 1769740134 dsn/fix-headers
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.896µs 3.912µs ± 0.003µs 3.912µs ± 0.002µs 3.914µs 3.916µs 3.918µs 3.922µs 0.25% -0.730 5.808 0.07% 0.000µs 1 200
credit_card/is_card_number/ throughput 255002847.715op/s 255615216.373op/s ± 175024.870op/s 255631439.667op/s ± 114965.518op/s 255726218.331op/s 255852828.572op/s 255966203.844op/s 256667611.228op/s 0.41% 0.745 5.887 0.07% 12376.127op/s 1 200
credit_card/is_card_number/ 3782-8224-6310-005 execution_time 77.065µs 77.620µs ± 0.313µs 77.590µs ± 0.187µs 77.783µs 78.196µs 78.432µs 78.763µs 1.51% 0.695 0.364 0.40% 0.022µs 1 200
credit_card/is_card_number/ 3782-8224-6310-005 throughput 12696375.529op/s 12883543.095op/s ± 51809.337op/s 12888208.585op/s ± 31043.968op/s 12917321.210op/s 12956853.053op/s 12970855.530op/s 12976018.708op/s 0.68% -0.673 0.314 0.40% 3663.473op/s 1 200
credit_card/is_card_number/ 378282246310005 execution_time 70.646µs 71.179µs ± 0.347µs 71.167µs ± 0.223µs 71.352µs 71.869µs 72.329µs 72.435µs 1.78% 0.971 1.115 0.49% 0.025µs 1 200
credit_card/is_card_number/ 378282246310005 throughput 13805467.259op/s 14049502.698op/s ± 68219.621op/s 14051509.703op/s ± 44241.839op/s 14098418.862op/s 14143039.391op/s 14149789.758op/s 14155037.617op/s 0.74% -0.940 1.022 0.48% 4823.856op/s 1 200
credit_card/is_card_number/37828224631 execution_time 3.893µs 3.913µs ± 0.003µs 3.913µs ± 0.002µs 3.915µs 3.918µs 3.920µs 3.920µs 0.20% -0.955 7.760 0.08% 0.000µs 1 200
credit_card/is_card_number/37828224631 throughput 255070422.788op/s 255574531.701op/s ± 203568.087op/s 255588012.963op/s ± 117756.173op/s 255693762.905op/s 255836278.890op/s 255939943.545op/s 256897228.244op/s 0.51% 0.976 7.901 0.08% 14394.437op/s 1 200
credit_card/is_card_number/378282246310005 execution_time 67.408µs 67.822µs ± 0.259µs 67.793µs ± 0.181µs 67.976µs 68.290µs 68.589µs 68.641µs 1.25% 0.783 0.629 0.38% 0.018µs 1 200
credit_card/is_card_number/378282246310005 throughput 14568543.719op/s 14744679.110op/s ± 56241.604op/s 14750739.178op/s ± 39255.233op/s 14782256.895op/s 14823224.595op/s 14829512.524op/s 14835034.417op/s 0.57% -0.760 0.574 0.38% 3976.882op/s 1 200
credit_card/is_card_number/37828224631000521389798 execution_time 44.649µs 45.196µs ± 0.173µs 45.204µs ± 0.131µs 45.330µs 45.455µs 45.512µs 45.520µs 0.70% -0.250 -0.459 0.38% 0.012µs 1 200
credit_card/is_card_number/37828224631000521389798 throughput 21968365.554op/s 22126006.260op/s ± 84866.479op/s 22121733.336op/s ± 64035.253op/s 22188250.773op/s 22255029.991op/s 22306261.166op/s 22396884.291op/s 1.24% 0.267 -0.436 0.38% 6000.966op/s 1 200
credit_card/is_card_number/x371413321323331 execution_time 6.028µs 6.038µs ± 0.009µs 6.036µs ± 0.003µs 6.040µs 6.044µs 6.093µs 6.111µs 1.24% 5.289 33.040 0.15% 0.001µs 1 200
credit_card/is_card_number/x371413321323331 throughput 163629168.480op/s 165623328.270op/s ± 255096.982op/s 165661667.556op/s ± 79398.008op/s 165736011.262op/s 165807785.343op/s 165890418.552op/s 165905348.794op/s 0.15% -5.256 32.720 0.15% 18038.081op/s 1 200
credit_card/is_card_number_no_luhn/ execution_time 3.896µs 3.914µs ± 0.003µs 3.914µs ± 0.002µs 3.916µs 3.918µs 3.919µs 3.920µs 0.16% -1.008 4.666 0.08% 0.000µs 1 200
credit_card/is_card_number_no_luhn/ throughput 255109730.121op/s 255502714.225op/s ± 195330.595op/s 255512614.692op/s ± 142451.053op/s 255641989.205op/s 255784237.627op/s 255889295.646op/s 256661397.543op/s 0.45% 1.021 4.751 0.08% 13811.959op/s 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time 65.328µs 65.718µs ± 0.085µs 65.723µs ± 0.061µs 65.771µs 65.848µs 65.905µs 65.911µs 0.29% -0.361 1.234 0.13% 0.006µs 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput 15172075.131op/s 15216564.912op/s ± 19620.037op/s 15215382.696op/s ± 14033.358op/s 15230840.182op/s 15246758.093op/s 15255406.380op/s 15307270.954op/s 0.60% 0.373 1.275 0.13% 1387.346op/s 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time 52.950µs 53.019µs ± 0.037µs 53.012µs ± 0.026µs 53.043µs 53.088µs 53.122µs 53.149µs 0.26% 0.777 0.316 0.07% 0.003µs 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 throughput 18814911.444op/s 18861195.262op/s ± 13172.832op/s 18863726.940op/s ± 9410.856op/s 18871367.418op/s 18878120.730op/s 18880201.239op/s 18885624.263op/s 0.12% -0.773 0.307 0.07% 931.460op/s 1 200
credit_card/is_card_number_no_luhn/37828224631 execution_time 3.891µs 3.912µs ± 0.003µs 3.912µs ± 0.002µs 3.914µs 3.917µs 3.919µs 3.920µs 0.19% -1.703 14.905 0.07% 0.000µs 1 200
credit_card/is_card_number_no_luhn/37828224631 throughput 255133055.482op/s 255609481.676op/s ± 186564.967op/s 255622788.772op/s ± 112739.170op/s 255725669.997op/s 255818166.852op/s 255876267.051op/s 257021922.381op/s 0.55% 1.734 15.166 0.07% 13192.135op/s 1 200
credit_card/is_card_number_no_luhn/378282246310005 execution_time 49.743µs 49.810µs ± 0.031µs 49.810µs ± 0.022µs 49.832µs 49.862µs 49.887µs 49.893µs 0.17% 0.314 -0.442 0.06% 0.002µs 1 200
credit_card/is_card_number_no_luhn/378282246310005 throughput 20042987.721op/s 20076473.643op/s ± 12404.547op/s 20076433.279op/s ± 9055.897op/s 20086184.221op/s 20093952.123op/s 20099058.601op/s 20103144.132op/s 0.13% -0.311 -0.445 0.06% 877.134op/s 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time 44.712µs 45.196µs ± 0.181µs 45.199µs ± 0.142µs 45.353µs 45.472µs 45.515µs 45.552µs 0.78% -0.195 -0.620 0.40% 0.013µs 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput 21952952.450op/s 22126143.489op/s ± 88826.659op/s 22124569.642op/s ± 69616.656op/s 22191592.161op/s 22275748.125op/s 22336818.884op/s 22365545.293op/s 1.09% 0.211 -0.604 0.40% 6280.993op/s 1 200
credit_card/is_card_number_no_luhn/x371413321323331 execution_time 6.029µs 6.036µs ± 0.005µs 6.036µs ± 0.003µs 6.038µs 6.045µs 6.051µs 6.068µs 0.54% 1.864 7.482 0.08% 0.000µs 1 200
credit_card/is_card_number_no_luhn/x371413321323331 throughput 164791631.133op/s 165661536.686op/s ± 137904.375op/s 165685866.700op/s ± 75375.272op/s 165754972.612op/s 165817120.939op/s 165856710.861op/s 165867710.485op/s 0.11% -1.849 7.367 0.08% 9751.312op/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.912µs; 3.913µs] or [-0.009%; +0.009%] None None None
credit_card/is_card_number/ throughput [255590959.610op/s; 255639473.137op/s] or [-0.009%; +0.009%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 execution_time [77.576µs; 77.663µs] or [-0.056%; +0.056%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 throughput [12876362.819op/s; 12890723.371op/s] or [-0.056%; +0.056%] None None None
credit_card/is_card_number/ 378282246310005 execution_time [71.130µs; 71.227µs] or [-0.068%; +0.068%] None None None
credit_card/is_card_number/ 378282246310005 throughput [14040048.115op/s; 14058957.282op/s] or [-0.067%; +0.067%] None None None
credit_card/is_card_number/37828224631 execution_time [3.912µs; 3.913µs] or [-0.011%; +0.011%] None None None
credit_card/is_card_number/37828224631 throughput [255546319.121op/s; 255602744.280op/s] or [-0.011%; +0.011%] None None None
credit_card/is_card_number/378282246310005 execution_time [67.786µs; 67.858µs] or [-0.053%; +0.053%] None None None
credit_card/is_card_number/378282246310005 throughput [14736884.565op/s; 14752473.656op/s] or [-0.053%; +0.053%] None None None
credit_card/is_card_number/37828224631000521389798 execution_time [45.172µs; 45.220µs] or [-0.053%; +0.053%] None None None
credit_card/is_card_number/37828224631000521389798 throughput [22114244.582op/s; 22137767.937op/s] or [-0.053%; +0.053%] None None None
credit_card/is_card_number/x371413321323331 execution_time [6.037µs; 6.039µs] or [-0.022%; +0.022%] None None None
credit_card/is_card_number/x371413321323331 throughput [165587974.282op/s; 165658682.258op/s] or [-0.021%; +0.021%] None None None
credit_card/is_card_number_no_luhn/ execution_time [3.913µs; 3.914µs] or [-0.011%; +0.011%] None None None
credit_card/is_card_number_no_luhn/ throughput [255475643.283op/s; 255529785.167op/s] or [-0.011%; +0.011%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time [65.706µs; 65.730µs] or [-0.018%; +0.018%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput [15213845.763op/s; 15219284.060op/s] or [-0.018%; +0.018%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time [53.014µs; 53.024µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 throughput [18859369.634op/s; 18863020.889op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/37828224631 execution_time [3.912µs; 3.913µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/37828224631 throughput [255583625.566op/s; 255635337.786op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/378282246310005 execution_time [49.805µs; 49.814µs] or [-0.009%; +0.009%] None None None
credit_card/is_card_number_no_luhn/378282246310005 throughput [20074754.492op/s; 20078192.794op/s] or [-0.009%; +0.009%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time [45.171µs; 45.221µs] or [-0.056%; +0.056%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput [22113832.968op/s; 22138454.010op/s] or [-0.056%; +0.056%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 execution_time [6.036µs; 6.037µs] or [-0.012%; +0.012%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 throughput [165642424.466op/s; 165680648.906op/s] or [-0.012%; +0.012%] None None None

Group 3

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz e677049 1769740134 dsn/fix-headers
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.251µs 3.175µs ± 1.428µs 3.002µs ± 0.022µs 3.021µs 3.319µs 13.842µs 15.092µs 402.69% 7.517 57.016 44.87% 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.977µs; 3.372µs] or [-6.234%; +6.234%] None None None

Group 4

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz e677049 1769740134 dsn/fix-headers
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 241.106ns 251.744ns ± 13.162ns 246.090ns ± 3.492ns 251.766ns 281.059ns 286.929ns 289.579ns 17.67% 1.578 1.034 5.22% 0.931ns 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 [249.919ns; 253.568ns] or [-0.725%; +0.725%] None None None

Group 5

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz e677049 1769740134 dsn/fix-headers
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 90.414µs 90.599µs ± 0.129µs 90.590µs ± 0.059µs 90.649µs 90.744µs 90.962µs 91.883µs 1.43% 5.335 48.841 0.14% 0.009µ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 [90.582µs; 90.617µs] or [-0.020%; +0.020%] None None None

Group 6

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz e677049 1769740134 dsn/fix-headers
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.986µs 5.076µs ± 0.044µs 5.083µs ± 0.040µs 5.117µs 5.131µs 5.137µs 5.150µs 1.33% -0.366 -1.168 0.86% 0.003µ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.070µs; 5.083µs] or [-0.120%; +0.120%] None None None

Group 7

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz e677049 1769740134 dsn/fix-headers
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.637µs 25.292µs ± 9.585µs 17.852µs ± 0.110µs 33.799µs 42.504µs 43.459µs 70.381µs 294.26% 0.973 0.784 37.80% 0.678µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
two way interface execution_time [23.964µs; 26.620µs] or [-5.252%; +5.252%] None None None

Group 8

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz e677049 1769740134 dsn/fix-headers
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 188.827ns 191.213ns ± 1.808ns 191.040ns ± 1.286ns 192.279ns 194.703ns 196.584ns 198.693ns 4.01% 1.051 1.201 0.94% 0.128ns 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 [190.963ns; 191.464ns] or [-0.131%; +0.131%] None None None

Group 9

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz e677049 1769740134 dsn/fix-headers
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
profile_add_sample_frames_x1000 execution_time 3.888ms 3.901ms ± 0.008ms 3.900ms ± 0.003ms 3.903ms 3.907ms 3.911ms 3.990ms 2.30% 8.105 93.300 0.19% 0.001ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
profile_add_sample_frames_x1000 execution_time [3.900ms; 3.902ms] or [-0.027%; +0.027%] None None None

Group 10

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz e677049 1769740134 dsn/fix-headers
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 12.934ms 13.130ms ± 0.059ms 13.131ms ± 0.037ms 13.169ms 13.220ms 13.262ms 13.426ms 2.24% 0.356 3.137 0.45% 0.004ms 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 [13.122ms; 13.139ms] or [-0.063%; +0.063%] None None None

Group 11

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz e677049 1769740134 dsn/fix-headers
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
profile_add_sample2_frames_x1000 execution_time 535.480µs 536.199µs ± 0.506µs 536.193µs ± 0.243µs 536.394µs 536.816µs 537.063µs 541.284µs 0.95% 5.165 49.094 0.09% 0.036µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
profile_add_sample2_frames_x1000 execution_time [536.129µs; 536.269µs] or [-0.013%; +0.013%] None None None

Group 12

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz e677049 1769740134 dsn/fix-headers
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 161.138µs 161.703µs ± 0.341µs 161.642µs ± 0.178µs 161.822µs 162.243µs 162.970µs 163.482µs 1.14% 2.086 7.133 0.21% 0.024µ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 [161.656µs; 161.750µs] or [-0.029%; +0.029%] None None None

Group 13

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz e677049 1769740134 dsn/fix-headers
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.135µs 206.028µs ± 0.518µs 205.966µs ± 0.277µs 206.259µs 206.803µs 207.341µs 209.979µs 1.95% 2.585 16.095 0.25% 0.037µs 1 200
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput 4762384.065op/s 4853747.956op/s ± 12126.045op/s 4855166.450op/s ± 6518.629op/s 4861467.396op/s 4868432.938op/s 4872699.557op/s 4874848.797op/s 0.41% -2.501 15.288 0.25% 857.441op/s 1 200
normalization/normalize_name/normalize_name/bad-name execution_time 18.569µs 18.680µs ± 0.065µs 18.667µs ± 0.039µs 18.713µs 18.803µs 18.878µs 18.941µs 1.47% 1.195 1.750 0.35% 0.005µs 1 200
normalization/normalize_name/normalize_name/bad-name throughput 52795759.158op/s 53532482.929op/s ± 186698.591op/s 53571140.773op/s ± 111741.274op/s 53669120.134op/s 53751637.811op/s 53813980.268op/s 53852483.444op/s 0.53% -1.170 1.668 0.35% 13201.584op/s 1 200
normalization/normalize_name/normalize_name/good execution_time 10.819µs 10.884µs ± 0.033µs 10.877µs ± 0.020µs 10.906µs 10.948µs 10.963µs 11.022µs 1.33% 0.854 0.919 0.30% 0.002µs 1 200
normalization/normalize_name/normalize_name/good throughput 90724808.110op/s 91878987.445op/s ± 275689.750op/s 91935340.682op/s ± 172364.866op/s 92086565.599op/s 92230810.915op/s 92326846.723op/s 92432788.662op/s 0.54% -0.834 0.856 0.30% 19494.209op/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 [205.956µs; 206.099µs] or [-0.035%; +0.035%] None None None
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput [4852067.403op/s; 4855428.509op/s] or [-0.035%; +0.035%] None None None
normalization/normalize_name/normalize_name/bad-name execution_time [18.671µs; 18.690µs] or [-0.049%; +0.049%] None None None
normalization/normalize_name/normalize_name/bad-name throughput [53506608.300op/s; 53558357.558op/s] or [-0.048%; +0.048%] None None None
normalization/normalize_name/normalize_name/good execution_time [10.879µs; 10.889µs] or [-0.042%; +0.042%] None None None
normalization/normalize_name/normalize_name/good throughput [91840779.497op/s; 91917195.393op/s] or [-0.042%; +0.042%] None None None

Group 14

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz e677049 1769740134 dsn/fix-headers
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.632ms 10.661ms ± 0.015ms 10.658ms ± 0.008ms 10.667ms 10.685ms 10.711ms 10.719ms 0.57% 0.967 1.643 0.14% 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.658ms; 10.663ms] or [-0.019%; +0.019%] None None None

Group 15

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz e677049 1769740134 dsn/fix-headers
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.214µs 145.748µs ± 1.647µs 145.495µs ± 0.440µs 145.957µs 147.080µs 152.400µs 162.407µs 11.62% 6.493 55.702 1.13% 0.116µ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 [145.520µs; 145.976µs] or [-0.157%; +0.157%] None None None

Group 16

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz e677049 1769740134 dsn/fix-headers
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 535.322µs 537.027µs ± 1.546µs 536.397µs ± 0.611µs 537.991µs 540.221µs 542.384µs 542.778µs 1.19% 1.523 2.130 0.29% 0.109µs 1 200
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput 1842372.265op/s 1862118.824op/s ± 5337.562op/s 1864290.712op/s ± 2126.002op/s 1866048.251op/s 1867018.182op/s 1867710.117op/s 1868033.129op/s 0.20% -1.508 2.062 0.29% 377.423op/s 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time 379.742µs 380.507µs ± 0.325µs 380.472µs ± 0.231µs 380.733µs 381.036µs 381.323µs 381.745µs 0.33% 0.507 0.325 0.09% 0.023µs 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput 2619550.893op/s 2628076.942op/s ± 2241.216op/s 2628315.957op/s ± 1596.890op/s 2629579.910op/s 2631428.814op/s 2631928.326op/s 2633368.372op/s 0.19% -0.501 0.313 0.09% 158.478op/s 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time 189.666µs 190.048µs ± 0.208µs 190.014µs ± 0.134µs 190.170µs 190.467µs 190.595µs 190.659µs 0.34% 0.718 0.062 0.11% 0.015µs 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput 5244964.028op/s 5261843.588op/s ± 5756.933op/s 5262773.309op/s ± 3710.431op/s 5266363.198op/s 5269012.723op/s 5271805.221op/s 5272424.840op/s 0.18% -0.713 0.053 0.11% 407.077op/s 1 200
normalization/normalize_service/normalize_service/[empty string] execution_time 36.429µs 36.556µs ± 0.049µs 36.555µs ± 0.031µs 36.585µs 36.641µs 36.667µs 36.714µs 0.44% 0.210 -0.052 0.13% 0.003µs 1 200
normalization/normalize_service/normalize_service/[empty string] throughput 27237410.567op/s 27355284.690op/s ± 36899.637op/s 27356182.243op/s ± 23189.695op/s 27379346.128op/s 27412856.443op/s 27430616.861op/s 27450598.785op/s 0.35% -0.202 -0.059 0.13% 2609.198op/s 1 200
normalization/normalize_service/normalize_service/test_ASCII execution_time 45.838µs 46.035µs ± 0.080µs 46.032µs ± 0.048µs 46.080µs 46.175µs 46.254µs 46.298µs 0.58% 0.362 0.548 0.17% 0.006µs 1 200
normalization/normalize_service/normalize_service/test_ASCII throughput 21599417.680op/s 21722818.565op/s ± 37844.734op/s 21724012.831op/s ± 22689.351op/s 21745680.403op/s 21785494.335op/s 21812208.394op/s 21815923.540op/s 0.42% -0.350 0.537 0.17% 2676.027op/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 [536.813µs; 537.241µs] or [-0.040%; +0.040%] None None None
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput [1861379.089op/s; 1862858.559op/s] or [-0.040%; +0.040%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time [380.462µs; 380.552µs] or [-0.012%; +0.012%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput [2627766.331op/s; 2628387.553op/s] or [-0.012%; +0.012%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time [190.019µs; 190.077µs] or [-0.015%; +0.015%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput [5261045.732op/s; 5262641.443op/s] or [-0.015%; +0.015%] None None None
normalization/normalize_service/normalize_service/[empty string] execution_time [36.549µs; 36.563µs] or [-0.019%; +0.019%] None None None
normalization/normalize_service/normalize_service/[empty string] throughput [27350170.756op/s; 27360398.625op/s] or [-0.019%; +0.019%] None None None
normalization/normalize_service/normalize_service/test_ASCII execution_time [46.024µs; 46.046µs] or [-0.024%; +0.024%] None None None
normalization/normalize_service/normalize_service/test_ASCII throughput [21717573.648op/s; 21728063.481op/s] or [-0.024%; +0.024%] None None None

Group 17

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz e677049 1769740134 dsn/fix-headers
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.316µs 2.385µs ± 0.039µs 2.383µs ± 0.005µs 2.390µs 2.405µs 2.410µs 2.882µs 20.94% 9.902 125.380 1.65% 0.003µ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.379µs; 2.390µs] or [-0.229%; +0.229%] None None None

Group 18

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz e677049 1769740134 dsn/fix-headers
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 48.493ms 48.810ms ± 1.044ms 48.657ms ± 0.047ms 48.718ms 48.899ms 54.303ms 59.212ms 21.69% 8.246 70.609 2.13% 0.074ms 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 [48.665ms; 48.955ms] or [-0.296%; +0.296%] None None None

Group 19

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz e677049 1769740134 dsn/fix-headers
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.561ms 14.643ms ± 0.035ms 14.640ms ± 0.017ms 14.656ms 14.717ms 14.772ms 14.789ms 1.01% 1.305 3.359 0.24% 0.003ms 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.639ms; 14.648ms] or [-0.034%; +0.034%] None None None

Baseline

Omitted due to size.

@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 92.59259% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.02%. Comparing base (488418a) to head (e677049).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1493      +/-   ##
==========================================
- Coverage   71.04%   71.02%   -0.02%     
==========================================
  Files         422      422              
  Lines       68697    68699       +2     
==========================================
- Hits        48804    48793      -11     
- Misses      19893    19906      +13     
Components Coverage Δ
libdd-crashtracker 61.28% <ø> (+0.01%) ⬆️
libdd-crashtracker-ffi 16.50% <ø> (ø)
libdd-alloc 98.73% <ø> (ø)
libdd-data-pipeline 86.84% <ø> (ø)
libdd-data-pipeline-ffi 78.57% <ø> (ø)
libdd-common 81.03% <95.65%> (+0.06%) ⬆️
libdd-common-ffi 74.54% <ø> (ø)
libdd-telemetry 59.82% <ø> (ø)
libdd-telemetry-ffi 21.17% <ø> (ø)
libdd-dogstatsd-client 83.75% <ø> (ø)
datadog-ipc 82.60% <ø> (-0.19%) ⬇️
libdd-profiling 81.49% <75.00%> (-0.01%) ⬇️
libdd-profiling-ffi 64.71% <ø> (ø)
datadog-sidecar 34.94% <ø> (ø)
datdog-sidecar-ffi 10.25% <ø> (ø)
spawn-worker 55.18% <ø> (ø)
libdd-tinybytes 93.43% <ø> (ø)
libdd-trace-normalization 82.33% <ø> (ø)
libdd-trace-obfuscation 94.17% <ø> (ø)
libdd-trace-protobuf 61.18% <ø> (ø)
libdd-trace-utils 89.45% <ø> (ø)
datadog-tracer-flare 63.49% <ø> (ø)
libdd-log 75.57% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@ivoanjo ivoanjo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 LGTM, Added a note about testing

Comment on lines +10 to +56
pub fn assert_entity_headers_match(headers: &HashMap<String, String>) {
// Check for entity headers and validate their values match what libdd_common provides
let expected_container_id = libdd_common::entity_id::get_container_id();
let expected_entity_id = libdd_common::entity_id::get_entity_id();
let expected_external_env = *libdd_common::entity_id::DD_EXTERNAL_ENV;

// Validate container ID
if let Some(expected) = expected_container_id {
assert_eq!(
headers.get("datadog-container-id"),
Some(&expected.to_string()),
"datadog-container-id header should match the value from entity_id::get_container_id()"
);
} else {
assert!(
!headers.contains_key("datadog-container-id"),
"datadog-container-id header should not be present when entity_id::get_container_id() is None"
);
}

// Validate entity ID
if let Some(expected) = expected_entity_id {
assert_eq!(
headers.get("datadog-entity-id"),
Some(&expected.to_string()),
"datadog-entity-id header should match the value from entity_id::get_entity_id()"
);
} else {
assert!(
!headers.contains_key("datadog-entity-id"),
"datadog-entity-id header should not be present when entity_id::get_entity_id() is None"
);
}

// Validate external env
if let Some(expected) = expected_external_env {
assert_eq!(
headers.get("datadog-external-env"),
Some(&expected.to_string()),
"datadog-external-env header should match the value from entity_id::DD_EXTERNAL_ENV"
);
} else {
assert!(
!headers.contains_key("datadog-external-env"),
"datadog-external-env header should not be present when entity_id::DD_EXTERNAL_ENV is None"
);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm I'm not the biggest fan of these tests, since they change their behavior dynamically based on the exact execution environment of the test runner, which means that

a) Whatever I get running on my machine may be different -- so maybe it fails in CI but never for me
b) We don't get full test coverage -- only whatever codepaths end up being picked

Is it possible to maybe mock the results of those functions for our tests?

That is, what I would do if this were Ruby would be to zoom out and say "the behavior in my headers is -- if each of these entries is available, the headers contain what got returned, and if there was nothing than the headers don't exist"

Then I'd mock container-id: [dummy-container-id, none], entity-id: [dummy-entity-id, none], external-env: [dummy-external-env, none] and check that I get the correct behavior in each of the 6 cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants