Skip to content

feat(http-lite): add no_std HTTP helpers#2218

Draft
pawelchcki wants to merge 7 commits into
mainfrom
signal_safe_telemetry_metrics_submission
Draft

feat(http-lite): add no_std HTTP helpers#2218
pawelchcki wants to merge 7 commits into
mainfrom
signal_safe_telemetry_metrics_submission

Conversation

@pawelchcki

@pawelchcki pawelchcki commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds libdd-http-lite, a lightweight, transport-agnostic, no_std-first HTTP layer built on reqwless.

The default configuration does not enable allocation, DNS, sockets, threads, locks, TLS, or a runtime. The crate provides:

  • low-level reqwless request and response types;
  • Datadog telemetry metrics helpers as its first protocol-specific request family; and
  • an optional libc DNS helper for setup code.

Motivation

Some libdatadog consumers need to own the complete I/O stack: transport, buffers, connection setup, and the point at which platform operations occur. A high-level HTTP client necessarily owns more of those decisions.

This crate introduces a small layer for HTTP message construction while leaving networking and execution policy to the caller.

Additional Notes

This crate does not claim that every use is signal-safe. It controls its own default dependency and feature footprint; callers remain responsible for the safety of their transport, buffers, and platform operations in their execution context.

Feature Default Purpose
alloc No Enables allocation-backed setup helpers.
std No Reserves standard-library support and implies alloc.
libc-dns No Adds weakly loaded getaddrinfo support for setup paths; it is not signal-safe.

How to test the change?

cargo check -p libdd-http-lite
cargo test -p libdd-http-lite --all-features
cargo +nightly-2026-02-08 fmt --all -- --check
cargo +stable clippy -p libdd-http-lite --all-targets --all-features -- -D warnings

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Clippy Allow Annotation Report

Comparing clippy allow annotations between branches:

  • Base Branch: origin/main
  • PR Branch: origin/signal_safe_telemetry_metrics_submission

Summary by Rule

Rule Base Branch PR Branch Change

Annotation Counts by File

File Base Branch PR Branch Change

Annotation Stats by Crate

Crate Base Branch PR Branch Change
clippy-annotation-reporter 5 5 No change (0%)
datadog-ffe-ffi 1 1 No change (0%)
datadog-ipc 22 22 No change (0%)
datadog-live-debugger 4 4 No change (0%)
datadog-live-debugger-ffi 10 10 No change (0%)
datadog-profiling-replayer 4 4 No change (0%)
datadog-sidecar 45 45 No change (0%)
libdd-common 13 13 No change (0%)
libdd-common-ffi 12 12 No change (0%)
libdd-data-pipeline 6 6 No change (0%)
libdd-ddsketch 2 2 No change (0%)
libdd-dogstatsd-client 1 1 No change (0%)
libdd-profiling 13 13 No change (0%)
libdd-remote-config 3 3 No change (0%)
libdd-telemetry 20 20 No change (0%)
libdd-tinybytes 4 4 No change (0%)
libdd-trace-normalization 2 2 No change (0%)
libdd-trace-obfuscation 3 3 No change (0%)
libdd-trace-stats 1 1 No change (0%)
libdd-trace-utils 11 11 No change (0%)
Total 182 182 No change (0%)

About This Report

This report tracks Clippy allow annotations for specific rules, showing how they've changed in this PR. Decreasing the number of these annotations generally improves code quality.

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

📚 Documentation Check Results

No documentation warnings found!

📦 libdd-http-lite - ✅ No warnings


Updated: 2026-07-09 23:04:49 UTC | Commit: d7f4f96 | missing-docs job results

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

🔒 Cargo Deny Results

No issues found!

📦 libdd-http-lite - ✅ No issues


Updated: 2026-07-09 23:04:52 UTC | Commit: d7f4f96 | dependency-check job results

@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Jul 9, 2026

Copy link
Copy Markdown

Pipelines  Tests

Fix all issues with BitsAI

⚠️ Warnings

🚦 6 Pipeline jobs failed

Lint | clippy #windows-latest msrv   View in Datadog   GitHub Actions

Lint | clippy #windows-latest nightly   View in Datadog   GitHub Actions

Lint | clippy #windows-latest stable   View in Datadog   GitHub Actions

View all 6 failed jobs.

ℹ️ Info

No other issues found (see more)

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 43.27%
Overall Coverage: 74.22% (-0.10%)

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 4052698 | Docs | Datadog PR Page | Give us feedback!

@dd-octo-sts

dd-octo-sts Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Artifact Size Benchmark Report

aarch64-alpine-linux-musl
Artifact Baseline Commit Change
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.so 7.88 MB 7.88 MB 0% (0 B) 👌
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.a 85.89 MB 85.89 MB 0% (0 B) 👌
aarch64-unknown-linux-gnu
Artifact Baseline Commit Change
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so 10.61 MB 10.61 MB 0% (0 B) 👌
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.a 97.11 MB 97.11 MB 0% (0 B) 👌
libdatadog-x64-windows
Artifact Baseline Commit Change
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.dll 25.45 MB 25.45 MB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.lib 88.44 KB 88.44 KB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.pdb 184.54 MB 184.53 MB -0% (-8.00 KB) 👌
/libdatadog-x64-windows/debug/static/datadog_profiling_ffi.lib 946.77 MB 946.77 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.dll 8.32 MB 8.32 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.lib 88.44 KB 88.44 KB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.pdb 24.62 MB 24.62 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/static/datadog_profiling_ffi.lib 49.03 MB 49.03 MB 0% (0 B) 👌
libdatadog-x86-windows
Artifact Baseline Commit Change
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.dll 22.05 MB 22.05 MB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.lib 89.82 KB 89.82 KB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.pdb 188.75 MB 188.76 MB +0% (+8.00 KB) 👌
/libdatadog-x86-windows/debug/static/datadog_profiling_ffi.lib 935.45 MB 935.45 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.dll 6.43 MB 6.43 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.lib 89.82 KB 89.82 KB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.pdb 26.43 MB 26.43 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/static/datadog_profiling_ffi.lib 46.66 MB 46.66 MB 0% (0 B) 👌
x86_64-alpine-linux-musl
Artifact Baseline Commit Change
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.a 76.59 MB 76.59 MB 0% (0 B) 👌
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.so 8.78 MB 8.78 MB 0% (0 B) 👌
x86_64-unknown-linux-gnu
Artifact Baseline Commit Change
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.a 92.11 MB 92.11 MB 0% (0 B) 👌
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so 10.70 MB 10.70 MB 0% (0 B) 👌

@pr-commenter

pr-commenter Bot commented Jul 9, 2026

Copy link
Copy Markdown

Benchmarks

Comparison

Benchmark execution time: 2026-07-09 23:39:33

Comparing candidate commit 4052698 in PR branch signal_safe_telemetry_metrics_submission with baseline commit e026a3c in branch main.

Found 2 performance improvements and 4 performance regressions! Performance is the same for 136 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:msgpack_decoder::v05/low_sharing/200

  • 🟥 execution_time [+16.942µs; +17.185µs] or [+4.899%; +4.969%]
  • 🟥 throughput [-27390.900op/s; -27000.320op/s] or [-4.736%; -4.669%]

scenario:profiles_dictionary/profile_string_inserts/threads/1

  • 🟥 execution_time [+14.680µs; +18.737µs] or [+4.838%; +6.175%]
  • 🟥 throughput [-197543.098op/s; -154741.987op/s] or [-5.853%; -4.585%]

scenario:vec_map/get_hit/8

  • 🟩 execution_time [-3.659ns; -3.573ns] or [-6.359%; -6.210%]
  • 🟩 throughput [+9215378.974op/s; +9427771.644op/s] or [+6.628%; +6.780%]

Candidate

Omitted due to size.

Baseline

Omitted due to size.

@pawelchcki pawelchcki changed the title [codex] add signal-safe telemetry HTTP client feat(signal-safe-http): add no_std telemetry request helpers Jul 9, 2026
@pawelchcki pawelchcki changed the title feat(signal-safe-http): add no_std telemetry request helpers feat(http): add no_std request primitives Jul 9, 2026
@pawelchcki pawelchcki changed the title feat(http): add no_std request primitives feat(http-lite): add no_std HTTP helpers Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant