Use OpenTelemetry PHP distro as Elastic Distribution of OpenTelemetry for PHP (#352)#367
Merged
Conversation
elastic#363) * Add upstream/ git submodule (opentelemetry-php-distro v0.2.0) and elastic/ directory structure * Implement native vendor library (ElasticVendor, ElasticConfigProvider) injected via CMAKE_PROJECT_INCLUDE * Add PHP bootstrap wrapper with ELASTIC_OTEL_* backward-compat env var mapping * Update build scripts and packaging tooling for upstream-based architecture
SergeyKleyman
previously approved these changes
Apr 27, 2026
v1v
previously approved these changes
Apr 27, 2026
2 tasks
intuibase
dismissed stale reviews from v1v and SergeyKleyman
April 27, 2026 14:13
The merge-base changed after approval.
alexandra5000
approved these changes
Apr 28, 2026
SergeyKleyman
approved these changes
Apr 28, 2026
v1v
approved these changes
Apr 28, 2026
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.
Rebase EDOT PHP on upstream opentelemetry-php-distro as git submodule
Restructures EDOT PHP to use
opentelemetry-php-distroas a git submodule (upstream/), keeping all Elastic-specific customizations isolated inelastic_prod/andelastic_tests/directories. This eliminates duplicated upstream files and establishes a clean separation between upstream code and EDOT extensions.Architecture
upstream/— git submodule pointing toopentelemetry-php-distro(v0.3.0)elastic_prod/— Elastic-only production code (native C++ vendor layer, PHP bootstrap, OpAMP config, vendor customizations)elastic_tests/— test patch system for modifying upstream tests at runtimecd upstreamKey changes
New Elastic-specific code (
elastic_prod/):bootstrap_elastic.php— env var mapping (ELASTIC_OTEL_*→OTEL_PHP_*),class_aliasbridging forOTelDistroScoped\namespace, vendor/consumer registrationElasticVendorCustomizations.php.template— distro name/version identityElasticRemoteConfigParser.php— self-contained OpAMP config parser with bug fixes (staleputenvin PHP-FPM,$_SERVERvsgetenv()resolution order)ElasticRemoteConfigConsumer.php— remote config consumer implementationElasticVendor,ElasticConfigProvider, CMake injection viaelastic_vendor_inject.cmakeTest patch system (
elastic_tests/patch/):apply.sh/revert.sh— applies/reverts*.patchfiles to upstream before/after component testsSdkDistroAttributesTest.patch— adjusts upstream test to validate EDOT distro attributesRemoved duplicate files:
prod/php/,tests/)tools/build/*.php,tools/build/*.sh)tools/test/component/*,docker/otel-tests/)Updated CI workflows:
actions/checkoutsteps includesubmodules: recursivecd upstreamdelegation