Repository navigation
Conversation
Update libdatadog to the FFL-3438 implementation and require application attribution in native and OpenFeature wire tests. Keep per-evaluation FFI context empty and align required inherited dependencies and generated bindings. Co-Authored-By: Codex <noreply@openai.com>
|
Benchmarks [ tracer ]Benchmark execution time: 2026-11-06 17:59:10 Comparing candidate commit 6ed1711 in PR branch Found 0 performance improvements and 1 performance regressions! Performance is the same for 220 metrics, 1 unstable metrics.
|
…2716) # What does this PR do? Attach application identity to `flagevaluation` track EVP events in the sidecar, using the application already registered on the connection. # Motivation [PHP #4288](DataDog/dd-trace-php#4288) intentionally sends empty application context instead of repeating service, environment, and application version on every evaluation. Until the sidecar fills those values, evaluations lack application attribution and different applications can share aggregation buckets. This implements [FFL-3438](https://datadoghq.atlassian.net/browse/FFL-3438), following the [application-identity review discussion](DataDog/dd-trace-php#4288 (comment)). # Changes and key decisions - When **all three batch-context fields are empty**, copy service, environment, and application version from the connection's current application **before aggregation**. Evaluations already queued for application A stay attributed to A if the connection switches to B before flushing. - When the application has a non-empty service name, fill missing or empty `context.dd.service` on non-degraded events. Keep explicit event-level service values, and never add per-event environment/version or restore context to degraded events. - Preserve explicitly supplied batch context, including partially populated context. If no application is registered, keep today's unattributed delivery rather than dropping the evaluation. - Check application service, environment, and version before copying them. If any exceeds 256 characters, keep the evaluations unattributed and preserve their counts. A debug log explains the skip without printing application values. - Submissions explicitly routed through `enqueue_actions_for_service` do not inherit the connection's application identity. - Reuse the existing application-update ordering and reconnect replay. No new queue, worker, configuration, or IPC fields. # Blast radius - Behavior changes only for empty-context `flagevaluation` submissions with a registered application. - Privacy consent, targeting-key hashing, truncation/degradation rules, and SDK-origin headers are unchanged. - Exposures, OTel metrics, tracing, and transport/reconnection behavior are unchanged. No FFI signature or wire-layout changes. - PHP must adopt the native release and validate the integration in [FFL-3439](https://datadoghq.atlassian.net/browse/FFL-3439) before releasing this functionality to customers. # How to test the change? - **Latest native validation (`2703c8ac8`):** 174 sidecar tests pass on Rust 1.91.1 / Linux ARM64; compilation, formatting, strict Clippy, and structural lint checks pass. macOS/Windows runtime coverage remains with CI. - **Regression coverage:** application changes before flush, separate connections, request-end clearing, explicit context, pending application replay, 256/257-character boundaries including Unicode, and the service-routing exclusion. Real IPC → HTTP tests check attribution, protected/consented/degraded payloads, raw PII canaries, and unchanged SDK-origin headers. - **C interface checks at [06e7952](06e79521e8ca196d0620e96bc21d409080a73cbd):** 220 sidecar/FFI tests passed with one existing skip, four doctests passed, and 13 C/C++ examples passed with two runner-defined skips. Generated C headers include both submission functions' attribution documentation. - **Earlier PHP/dogfooding validation:** [PHP #4368](DataDog/dd-trace-php#4368) used native `58b7380` and PHP `e9e88caf2`, before the later native fixes. On Linux ARM64 / PHP 8.2 NTS, 23 PHPT tests passed with three environment-dependent skips; the two-worker request-reuse probe attributed 8/8 evaluations correctly. Dogfooding matched master with 36/36 successful evaluations and 36 OTel metrics, unchanged results, and correct application service tags. Live configuration enabled full consent. - **Earlier system-tests on those same revisions:** 51/53 passed versus 48/53 on master, including all three consent modes. Remaining failures were the context-bounds fixture rejecting the service tag ([FFL-3407](https://datadoghq.atlassian.net/browse/FFL-3407)) and shared-sender backpressure during the high-volume count test on both builds. These results do not validate the latest native revision or establish equivalent stress performance. - [ ] Before releasing the PHP functionality, update [PHP #4368](DataDog/dd-trace-php#4368) to the merged libdatadog version and rerun PHP validation, system-tests, and ffe-dogfooding ([FFL-3439](https://datadoghq.atlassian.net/browse/FFL-3439)). [FFL-3438]: https://datadoghq.atlassian.net/browse/FFL-3438?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ [FFL-3439]: https://datadoghq.atlassian.net/browse/FFL-3439?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ Co-authored-by: vickie.fridge <vickie.fridge@datadoghq.com>
Pin libdatadog to merged #2716, regenerate native bindings and Cargo dependencies, and retain the application-identity regression tests. Adapt debugger capture size to the native numeric field and update its existing regression expectation.
Description
Motivation
PHP emits
flagevaluationtrack EVP events, but its current libdatadogdependency does not attach the application's identity. This adopts merged
libdatadog #2716 so events
identify the right application and do not combine evaluations from different
applications. Implements FFL-3439
and follows PHP #4288.
Changes and key decisions
3c17d86ddbbc2e4067b0a5680af38b5276810eb9;regenerate the required Cargo dependencies and C bindings.
the application already registered on the connection, before aggregation.
context.dd.serviceon ordinary events. Environment/version stay off theindividual events; protected/degraded events retain their privacy rules.
evaluations keep their original identity, even when they use the same flag.
Update PHP's assignment and the existing regression test accordingly.
Blast radius
Flag results, privacy rules, exposures, and SDK-origin headers keep their
existing behavior.
debugger-size, OTLP resource-attribute, remote-config state, and regex-facade
changes, plus the v48 release commit. The debugger change requires the small
PHP compatibility adjustment above; this is more than an FFE-only update.
telemetry, and sidecar paths. Other supported platforms remain CI coverage.
Testing
Validated the source tree committed as
6ed17113cagainst PHP master
b89e238e4, using separately built local SDK artifacts.FFE/native/OpenFeature tests 34 pass, 3 skip and shared-path tests
56 pass, 5 skip on each. Skips require other services, extensions,
PHP versions, ZTS, or Windows.
51/55 on master. The four baseline failures lack application attribution.
Absent/false/true consent pass, with protected payloads checked for raw PII.
Master delivered 11,955 + 45 reported drops; this branch delivered 11,846 +
154 reported drops. This checks accounting, not equivalent performance or
lossless delivery.
36 evaluations and 36 OTel metrics, with identical flag responses.
All new events have the expected service; origin remains
dd-trace-php/1.27.0. Live consent was enabled; system-tests cover absent/false consent.the correct service/environment/version through identity changes and resets.
Frozen harnesses: system-tests
429e9e5and ffe-dogfooding
2b662f8.Remaining before merge
Reviewer checklist