SDK for OpenTelemetry PHP.

1.0.8 2024-02-02 03:42 UTC


Releases Source Mirror Latest Version Stable

OpenTelemetry SDK

The OpenTelemetry PHP SDK implements the API, and should be used in conjunction with contributed exporter(s) to generate and export telemetry.


Getting started

Manual setup


SDK Builder



SDK autoloading works with configuration values provided via the environment (or php.ini).

The SDK can be automatically created and registered, if the following conditions are met:

SDK autoloading will be attempted as part of composer's autoloader:

require 'vendor/autoload.php';

$tracer = \OpenTelemetry\API\Globals::tracerProvider()->getTracer('example');
$meter = \OpenTelemetry\API\Globals::meterProvider()->getMeter('example');

If autoloading was not successful (or partially successful), no-op implementations of the above may be returned.

See for a more detailed example.


This repository is a read-only git subtree split. To contribute, please see the main OpenTelemetry PHP monorepo.