PHPackages                             tbachert/otel-sdk-configuration - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. tbachert/otel-sdk-configuration

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

tbachert/otel-sdk-configuration
===============================

OpenTelemetry SDK configuration

v0.2.1(1y ago)0399Apache-2.0PHPPHP ^8.1

Since Jan 21Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Nevay/otel-sdk-configuration)[ Packagist](https://packagist.org/packages/tbachert/otel-sdk-configuration)[ RSS](/packages/tbachert-otel-sdk-configuration/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (6)Versions (8)Used By (0)

Configuration
=============

[](#configuration)

Allows creation of an extensible configuration model according to the [OTel file configuration specification](https://opentelemetry.io/docs/specs/otel/configuration/file-configuration/).

Installation
------------

[](#installation)

```
composer require tbachert/otel-sdk-configuration
```

Additionally, you will need either `ext-yaml` or `symfony/yaml` to load configuration from yaml config files.

Usage
-----

[](#usage)

### Parsing config

[](#parsing-config)

```
$factory = new ConfigurationFactory(
    [
        // all available providers ...
    ],
    new OpenTelemetryConfiguration(),
    new EnvSourceReader([
        new ArrayEnvSource($_SERVER),
        new PhpIniEnvSource(),
    ]),
);
$configuration = $factory->parseFile(__DIR__ . '/config.yaml');
$openTelemetry = $configuration->create(new Context());
```

### Defining component providers

[](#defining-component-providers)

See [examples](./examples) for component provider examples.

###### Example: BatchSpanProcessor

[](#example-batchspanprocessor)

```
final class SpanProcessorBatch implements ComponentProvider {

    /**
     * @param array{
     *     schedule_delay: int,
     *     export_timeout: int,
     *     max_queue_size: int,
     *     max_export_batch_size: int,
     *     exporter: ComponentPlugin,
     * } $properties
     */
    public function createPlugin(array $properties, Context $context): SpanProcessor {
        // ...
    }

    public function getConfig(ComponentProviderRegistry $registry): ArrayNodeDefinition {
        $node = new ArrayNodeDefinition('batch');
        $node
            ->children()
                ->integerNode('schedule_delay')->min(0)->defaultValue(5000)->end()
                ->integerNode('export_timeout')->min(0)->defaultValue(30000)->end()
                ->integerNode('max_queue_size')->min(0)->defaultValue(2048)->end()
                ->integerNode('max_export_batch_size')->min(0)->defaultValue(512)->end()
                ->append($registry->component('exporter', SpanExporter::class)->isRequired())
            ->end()
        ;

        return $node;
    }
}
```

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance43

Moderate activity, may be stable

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~76 days

Recently: every ~90 days

Total

6

Last Release

461d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7d96445384720ee37aa71d5ddd7b5a5d159558200b15b8a1b14e65e6095f2a7a?d=identicon)[tbachert](/maintainers/tbachert)

---

Top Contributors

[![Nevay](https://avatars.githubusercontent.com/u/22509671?v=4)](https://github.com/Nevay "Nevay (26 commits)")

---

Tags

sdkconfigurationopentelemetryotel

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/tbachert-otel-sdk-configuration/health.svg)

```
[![Health](https://phpackages.com/badges/tbachert-otel-sdk-configuration/health.svg)](https://phpackages.com/packages/tbachert-otel-sdk-configuration)
```

###  Alternatives

[open-telemetry/sdk

SDK for OpenTelemetry PHP.

2326.5M315](/packages/open-telemetry-sdk)[traceway/opentelemetry-symfony

Pure-PHP OpenTelemetry instrumentation for Symfony — automatic HTTP, Console, HttpClient, Messenger, Doctrine DBAL, Cache, Twig tracing and Monolog log-trace correlation with response propagation, a lightweight Tracing helper, route templates, and semantic conventions. No C extension required (ext-protobuf recommended for production).

774.6k](/packages/traceway-opentelemetry-symfony)[friendsofopentelemetry/opentelemetry-bundle

Traces, metrics, and logs instrumentation within your Symfony application

6510.2k](/packages/friendsofopentelemetry-opentelemetry-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
