feat(sidecar): forward FFE exposures to EVP proxy#2026
Conversation
Adds SidecarAction::FfeExposures variant so the PHP tracer can hand a batched exposure payload to the sidecar, and adds an ffe_flusher module that POSTs the payload to the agent's EVP proxy at /evp_proxy/v2/api/v2/exposures with X-Datadog-EVP-Subdomain: event-platform-intake. Matches dd-trace-go / ruby / python / js / dotnet wire protocol. Fire-and-forget; non-2xx is logged and dropped (no agent_info gating, consistent with other tracers). Also exposes ddog_sidecar_send_ffe_exposures FFI in datadog-sidecar-ffi for the PHP extension to call from its RSHUTDOWN / MSHUTDOWN hooks. Tests: 3 httpmock-backed cases cover POST method + path + subdomain header + body, non-2xx drop, and endpoint-path override while preserving authority / scheme / auth / timeout.
📚 Documentation Check Results📦
|
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. |
🔒 Cargo Deny Results📦
|
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: a649b7f | Docs | Datadog PR Page | Give us feedback! |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2026 +/- ##
==========================================
+ Coverage 72.71% 72.82% +0.11%
==========================================
Files 453 459 +6
Lines 74934 75909 +975
==========================================
+ Hits 54486 55282 +796
- Misses 20448 20627 +179
🚀 New features to boost your workflow:
|
Motivation
The PHP FFE/OpenFeature runtime needs to flush exposure batches through the sidecar without reimplementing sidecar transport in dd-trace-php. This imports the sidecar FFE exposure forwarding API from the reference dd-trace-php implementation so the tracer can call into libdatadog.
Reference planning doc: https://docs.google.com/document/d/1NvMfTpZWLBlFmEFNjdnlMyeVpy5l7KD8qujGFco6w2w/edit?tab=t.0
Reference dd-trace-php PR: DataDog/dd-trace-php#3630
Changes
SidecarAction::FfeExposuresaction andddog_sidecar_send_ffe_exposuresFFI entrypoint./evp_proxy/v2/api/v2/exposureswithX-Datadog-EVP-Subdomain: event-platform-intake.Decisions
NativeCapabilitiesHTTP capability API instead of the olderDefaultHttpClientnames from the reference branch.Validation
cargo test -p datadog-sidecar ffe_flushercargo check -p datadog-sidecar-ffi