Skip to content

[Donation Proposal]: Elastic distribution of OpenTelemetry for PHP (elastic/elastic-otel-php) #2846

Open
@intuibase

Description

@intuibase

Project description

This project provides an OpenTelemetry PHP Distribution designed for production use, with fully automated packaging and installation.

Unlike the vanilla opentelemetry-php SDK or the opentelemetry-php-instrumentation, which require manual setup and build steps, this distro is delivered as native OS packages (RPM, DEB, APK). These packages enable OpenTelemetry instrumentation out-of-the-box, without requiring changes to the application or its deployment process.

Additionally, the project includes a new PHP extension implemented in C++20, designed to:

  • Reduce long-term maintenance burden
  • Provide better performance, memory management, and runtime stability
  • Enable advanced features not easily achievable in pure PHP implementations

Key Differences from Existing OpenTelemetry PHP Projects

While opentelemetry-php-instrumentation also provides automatic instrumentation capabilities, it still requires manual installation of the PHP extension (compilation, dependency management, and packaging), app-level configuration, and changes to deployment pipelines. In many environments (e.g., shared hosting, locked-down production environments), these steps are impractical.

The Elastic Distribution (EDOT PHP) eliminates this friction:

  • Automated setup:

    • Delivered as native OS packages
    • Extension is compiled, version-matched, and ready to use for all installed PHP versions
    • Instrumentation works automatically after installation and a simple app restart
  • No application changes required:

    • No modification of the app package
    • No redeployment needed
    • No manual SDK/instrumentation configuration
  • Additional production-grade features:

    • Background sending of telemetry (non-blocking)
    • Inferred spans to enrich traces without custom instrumentation
    • Automatic transaction spans and grouping
    • Built-in native Google Protobuf serialization (no need for ext-protobuf)
    • Upcoming support for:
      • Dynamic configuration via OpAMP
      • Dedicated process for telemetry sending and config distribution
      • gRPC-based background sending
      • Worker metrics aggregation or shared storage
  • Broader compatibility:

    • Supports PHP 8.1 and newer (vs vanilla SDK which supports native instrumentation starting from PHP 8.2)

Zero-Config Onboarding

After installing the package via your OS package manager, OpenTelemetry instrumentation is enabled immediately — without requiring environment variable setup, SDK code changes, or configuration steps. This drastically reduces the barrier to adoption, especially in enterprise or legacy environments.

Benefits to the OpenTelemetry community

The PHP ecosystem has unique characteristics:

  • Applications often run in environments where changes to the app code or deployment are difficult or not allowed (modifying application code is impractical, rebuilding containers is not feasible)
  • Containers or shared hosts typically rely on OS package-based PHP distributions
  • Many environments lack compilers or development tools needed to build native extensions

This distro is designed specifically for such scenarios. It expands OpenTelemetry adoption by:

  • Providing a frictionless alternative for environments where the vanilla SDK is difficult to use
  • Requiring no developer effort to enable instrumentation
  • Making OpenTelemetry accessible to legacy, restricted, or production-locked PHP systems

Importantly, this project complements existing OpenTelemetry PHP efforts — it does not replace or compete with them. It offers a different deployment model and introduces a native runtime optimized for performance and stability.

Reasons for donation

Elastic is dedicated to OpenTelemtry’s vision to make it the single, ubiquitous standard and framework for Observability. With this donation, we strive to help OpenTelemetry to successfully instrument PHP applications without requiring changes to the application or their deployment by donating our OpenTelemetry PHP Distro to OpenTelemetry’s ecosystem.

Repository

https://github.com/elastic/elastic-otel-php

Existing usage

The elastic-otel-php project is already used in production environments by Elastic users as the default OpenTelemetry-based PHP agent distribution.

It is:

  • Packaged and shipped as part of the Elastic offering
  • Deployed in customer production environments across various Linux distributions using RPM, DEB, and APK packages
  • Integrated with Elastic Observability, but designed to be vendor-neutral and compatible with any OpenTelemetry backend
  • Tested in real-world PHP applications (including high-throughput workloads and legacy environments)
  • Used in containerized and non-containerized deployments, including common PHP stacks (e.g., Apache + mod_php, PHP-FPM, CLI scripts)

The distro has been in active development and production use since April 2025 and has helped users instrument their applications with minimal effort — particularly in environments where modifying application code or redeploying containers is not feasible.

Maintenance

Pawel Filipczak (@intuibase) and Sergey Kleyman (@SergeyKleyman) would like to remain one of the maintainers of the project after donation.
We are committed to working in the open and collaborating with the OpenTelemetry community under CNCF governance.

Licenses

The project is already open source using Apache 2.0 license (same as OpenTelemetry). This makes the code easy to access for review and evaluation of the donation proposal in the next few weeks.

Trademarks

Currently, the codebase uses the word Elastic in namespace names and in some configuration options and we do not intend to donate any code that includes the name “Elastic”. We will make sure that any use of the "Elastic" as name is removed or neutralized in the codebase should the donation be accepted, in alignment with OpenTelemetry community guidelines and CNCF neutrality principles.

Other notes

Proposed target repository name

opentelemetry-php-distro
(as suggested in open-telemetry/community#2644)

Post-donation tasks

Upon acceptance of this donation, we plan to perform the following tasks to align the project with OpenTelemetry community expectations:

  • Change Elastic namespaces in the code to OpenTelemetry (or other agreed neutral naming)
  • Modify vendor-specific configuration options:
    • Rename ELASTIC_OTEL_* options to either OTEL_* or OTEL_PHP_* (to be agreed with SIG PHP and the community)
  • Prepare and align CI/CD pipelines for the new repository
  • Open an Elastic-hosted Conan repository or migrate the Conan packages to another community-accessible repository
  • Update relevant OpenTelemetry PHP documentation to include this distro as an official option

We look forward to collaborating with the community on these efforts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions