OpenTelemetry PHP is the official PHP implementation of OpenTelemetry: a monorepo of Composer packages published on Packagist that provide tracing, metrics, and logging APIs, an SDK, context propagation, semantic conventions, and an OTLP exporter for PHP applications, aimed at PHP developers and platform teams who must instrument services and ship telemetry to an observability backend.
What it is
The project is the monorepo for the main components of OpenTelemetry for PHP. It ships the API (open-telemetry/api), the SDK (open-telemetry/sdk), context handling (open-telemetry/context), semantic conventions (open-telemetry/sem-conv), the OTLP exporter (open-telemetry/exporter-otlp), a gRPC transport (open-telemetry/transport-grpc), generated OTLP protobuf files (open-telemetry/gen-otlp-protobuf), and a B3 propagator (open-telemetry/extension-propagator-b3). Development happens in one repository, while releases for both this repository and the separate opentelemetry-php-contrib repository are produced by read-only git subtree splits and published to Packagist. Documentation lives at the official OpenTelemetry site, with generated API documentation for the library.
The concrete problem it solves is fragmentation of telemetry code inside PHP applications. Without a shared library, each service ends up with its own instrumentation calls, its own exporter code, and its own propagation rules, so traces stop at service boundaries and metrics cannot be compared between teams. This project supplies one API for instrumenting code, one SDK to collect and process the resulting spans, metrics, and log records, and a defined wire path out of the process over OTLP, including a gRPC transport and protobuf definitions. Libraries and frameworks can depend on the API package alone, while applications wire in the SDK and exporter, which keeps instrumentation code decoupled from the collection pipeline. The B3 propagator covers environments where B3 headers are already in use for context transfer between services.
Key capabilities
- Tracing, metrics, and logging are covered as first-class concerns, matching the
tracing, metrics, and logging topics of the repository.
- The API is packaged separately from the SDK as
open-telemetry/api and open-telemetry/sdk, so instrumentation can be written against a stable surface.
- Context propagation is provided by
open-telemetry/context.
- Telemetry export uses OTLP through
open-telemetry/exporter-otlp, with open-telemetry/transport-grpc for gRPC transport and open-telemetry/gen-otlp-protobuf for the generated protobuf message definitions.
- Header-based context transfer into B3-based environments is supported through
open-telemetry/extension-propagator-b3.
- Attribute naming follows
open-telemetry/sem-conv, the shared semantic conventions package.
- The monorepo publishes each package to Packagist through subtree splits, and additional instrumentation lives in
opentelemetry-php-contrib. Continuous integration runs a PHP QA workflow, with coverage reported through Codecov.
Who uses it and how
- PHP application teams add the SDK and an exporter through Composer and instrument request handling, background jobs, and outbound calls so that traces and metrics reach a collector.
- Library and framework maintainers depend on
open-telemetry/api only, emitting spans without forcing a specific SDK or backend on their users.
- Platform and operations teams standardize on OTLP as the single egress format, choosing the transport, including gRPC, that fits their collector deployment.
- Teams that already run B3 propagation between services add
open-telemetry/extension-propagator-b3 so PHP participates in the existing trace context scheme.
- Contributors extend the ecosystem through
opentelemetry-php-contrib and coordinate in the cncf/otel-php Slack channel; the repository carries 912 stars, 233 forks, and 97 open issues, which reflects an active but still growing community.
Getting started
Install the packages from Packagist with Composer, for example composer require open-telemetry/sdk open-telemetry/exporter-otlp, and follow the setup described at https://opentelemetry.io/docs/instrumentation/php/. Because releases are cut as subtree splits from the monorepo, version information for each package is best read from packagist.org.
How it compares
The provided facts name no comparable PHP telemetry library, so within this registry the project stands alone rather than sitting beside named alternatives. Its nearest relatives are the other pieces of the OpenTelemetry ecosystem itself, including the opentelemetry-php-contrib repository that holds instrumentation built on top of this core.
When to use it — and when not to
The library produces and exports telemetry but does not store, index, or visualize it, so anyone adopting it must also run an OTLP-compatible backend and collector that receives the exported data. Teams that want a turnkey observability product with dashboards and alerting built in will need to add that separately, and teams not using Composer or PHP are outside its scope. One honest caveat: the README is sparse and mostly delegates detail to the external documentation site, and the repository currently carries 97 open issues, so adopters should expect to read the official docs and packaging pages rather than the repository front page.
project readme (upstream, from github) — read inline
OpenTelemetry for PHP

This is the monorepo for the main components of OpenTelemetry for PHP.
Documentation
Please read the official documentation: https://opentelemetry.io/docs/instrumentation/php/
API Documentation is available here: https://open-telemetry.github.io/opentelemetry-php/
AI Assistance
If you're planning on using AI to contribute to the OpenTelemetry PHP repositories, please follow the OpenTelemetry GenAI Policies.
Packages and versions
Releases for both this repository and contrib are
based on read-only git subtree splits from our monorepo. You should refer to
packagist.org for all packages, their versions and details.
You can also look at the read-only repositories, which live in the
opentelemetry-php organization.
Contributing

We would love to have you on board, please see our Contributing README
Emeritus
- Ago Allikmaa, Approver
- Amber Sistla, Triager
- Beniamin, Triager
- Cedric Ziel, Approver
- Fahmy Mohammed, Triager
- Jodee Varney, Triager
- Kishan Sangani, Triager
- Levi Morrison, Triager
- Przemyslaw Delewski, Triager
- Timo Michna, Triager
For more information about the emeritus role, see the
community repository.
Specification conformance
We attempt to keep the OpenTelemetry Specification Matrix up to date in order to show which features are available and which have not yet been implemented.
If you find an inconsistency in the data in the matrix, please let us know in our slack channel and we'll get it rectified.
Backwards compatibility
See compatibility readme.
Versioning
OpenTelemetry for PHP aims to support all officially supported PHP versions according to https://www.php.net/supported-versions.php, and
support will be dropped for PHP versions within 12 months of that version going End of life.
Versioning rationale can be found in the Versioning Documentation