feat(libdd-healthplatform): add no_std crate for agent-payload healthplatform.proto#1987
Draft
pawelchcki wants to merge 2 commits into
Draft
feat(libdd-healthplatform): add no_std crate for agent-payload healthplatform.proto#1987pawelchcki wants to merge 2 commits into
pawelchcki wants to merge 2 commits into
Conversation
Vendors `agent-payload/proto/healthplatform/healthplatform.proto` and ships prost-generated Rust types as `no_std + alloc`. Encoding is always on; the `decode` feature gates a public decode helper module. A feature-gated example (`evp_proxy_send`) demonstrates POSTing a JSON `HealthReport` through the trace-agent's evp_proxy to `agenthealth-intake.<site>/api/v2/agenthealth`, mirroring the wire format used by `comp/healthplatform/impl/forwarder.go`.
Contributor
📚 Documentation Check Results📦
|
Contributor
Clippy Allow Annotation ReportComparing clippy allow annotations between branches:
Summary by Rule
Annotation Counts by File
Annotation Stats by Crate
About This ReportThis 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. |
Contributor
🔒 Cargo Deny Results✅ No issues found! 📦
|
…ON helpers - Remove `encode`/`decode` modules and the `decode` feature; consumers call `report.encode_to_vec()` / `HealthReport::decode(bytes)` directly via the prost `Message` trait that every generated type already implements. - Stop re-exporting `prost` / `prost_types` from the crate root; the integration test imports them as direct dev-dependencies. Closes off an accidental public ABI surface. - Drop `rustls` from reqwest's feature set in the example; we POST to localhost over plain HTTP. - Collapse the ~140-line `health_report_to_json` / `issue_to_json` boilerplate to three small `put_str` / `put_opt_str` / `put_str_vec` helpers; matches Go `encoding/json` + omitempty semantics with much less noise. - Dedupe leap-year arithmetic in the example's `now_rfc3339`.
🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: 2260f25 | Docs | Datadog PR Page | Give us feedback! |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1987 +/- ##
==========================================
+ Coverage 72.63% 72.68% +0.04%
==========================================
Files 451 452 +1
Lines 74687 74702 +15
==========================================
+ Hits 54249 54297 +48
+ Misses 20438 20405 -33
🚀 New features to boost your workflow:
|
Contributor
Artifact Size Benchmark Reportaarch64-alpine-linux-musl
aarch64-unknown-linux-gnu
libdatadog-x64-windows
libdatadog-x86-windows
x86_64-alpine-linux-musl
x86_64-unknown-linux-gnu
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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?
Adds a new workspace crate
libdd-healthplatformthat vendorsagent-payload'shealthplatform.protoand exposes prost-generated Rust types for all 10 messages as ano_std + alloclibrary.decodefeature (API-surface gate; prost-build emits the decoders regardless).src/healthplatform.rsis behind thegenerate-protobuffeature so CI uses the checked-in output.example-client) ships a tiny client that POSTs a JSONHealthReportthrough the local trace-agent'sevp_proxytoagenthealth-intake.<site>/api/v2/agenthealth, matchingdatadog-agent/comp/healthplatform/impl/forwarder.go's wire format (Content-Type: application/json, snake_case keys).Motivation
libdatadog had no Rust types for the agent-health intake schema. This crate is the substrate other libdatadog components (and downstream tracers) need to report agent-health issues without pulling in std.
Additional Notes
map<>fields are emitted asBTreeMapto keep the generated code no_std-clean.google.protobuf.Structis reused fromprost-typesrather than vendored.INTERNAL_INTAKE_REQUESTor JSON (verified end-to-end against staging —HTTP 202, drop counter flat).How to test the change?