feat(ffe): add native exposure lifecycle#3905
Closed
leoromanovsky wants to merge 1 commit into
Closed
Conversation
|
Benchmarks [ tracer ]Benchmark execution time: 2026-05-22 02:45:01 Comparing candidate commit 9c7dcaf in PR branch Found 1 performance improvements and 0 performance regressions! Performance is the same for 191 metrics, 2 unstable metrics. scenario:MessagePackSerializationBench/benchMessagePackSerialization-opcache
|
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.
Motivation
This is PR J in the PHP OpenFeature/FFE stack. PR I wires Remote Config config delivery into the native evaluator; this slice adds native exposure buffering and lifecycle delivery so successful logged evaluations can be drained through the tracer sidecar.
Shared planning/reference doc: https://docs.google.com/document/d/1NvMfTpZWLBlFmEFNjdnlMyeVpy5l7KD8qujGFco6w2w/edit?tab=t.0
Reference implementation: #3630
Libdatadog dependency: DataDog/libdatadog#2026
Changes
ddog_sidecar_send_ffe_exposuresfrom thelibdatadogsubmodule and use it fromext/sidecar.cinstead of implementing EVP sidecar forwarding in dd-trace-php.NativeExposureWriterand makeClient::create()use it by default when the extension functions are available.libdatadogsubmodule and PHPT coverage for buffer drain/dedup and fork reset behavior.Decisions
NativeExposureWriter::flush()is intentionally a no-op because production delivery is owned by extension lifecycle hooks. Calling the test-only native flush function from userland would drain without forwarding to the sidecar.productionRuntime => falseuntil the remaining metrics and end-to-end activation slices land.Validation
git diff --checkfind src/api/FeatureFlags tests/api/Unit/FeatureFlags -name '*.php' -print0 | xargs -0 -n1 php -n -lphp -n -l tests/ext/ffe/flush_drains_buffer.phpt && php -n -l tests/ext/ffe/fork_resets_dedup.phpt && php -n -l ext/ddtrace.stub.phpvendor/bin/phpcs -s src/api/FeatureFlags tests/api/Unit/FeatureFlagsphp -n vendor/bin/phpunit --config=phpunit.xml tests/api/Unit/FeatureFlagsvendor/bin/phpunit --config=phpunit.xml tests/api/Unit/FeatureFlagsRUSTC_BOOTSTRAP=1 cargo check -p ddtrace-phpRUSTC_BOOTSTRAP=1 cargo test -p ddtrace-php exposure_flush_drains_buffer_and_keeps_contextEXTRA_CFLAGS="-I$(brew --prefix pcre2)/include" EXTRA_LDFLAGS="-L$(brew --prefix pcre2)/lib" make -j"$(sysctl -n hw.ncpu)"php -n -d extension=tmp/build_extension/modules/ddtrace.so -m | rg -i '^ddtrace$'make test_c TESTS=tests/ext/ffe/flush_drains_buffer.phptmake test_c TESTS=tests/ext/ffe/fork_resets_dedup.phptmake test_c TESTS=tests/ext/ffe/native_bridge_evaluate.phptmake test_c TESTS=tests/ext/ffe/remote_config_lifecycle.phptskipped locally becauserequest-replayeris unavailable outside the Datadog dev environment.