open-telemetry/sdk-configuration

SDK configuration for OpenTelemetry PHP.

Package info

github.com/opentelemetry-php/config-sdk

Issues

Chat

Documentation

pkg:composer/open-telemetry/sdk-configuration

Statistics

Installs: 150 925

Dependents: 6

Suggesters: 1

Stars: 0

0.8.0 2026-03-21 11:50 UTC

Requires

Requires (Dev)

None

Suggests

  • ext-yaml: Allows loading config from yaml files
  • symfony/yaml: Allows loading config from yaml files
  • tbachert/spi: Allows defining and loading component providers from composer.json extra.spi

Provides

None

Conflicts

None

Replaces

None

Apache-2.0 c4992fa2a8c38e9d931741730ddd29c917254e65

configurationsdkopentelemetryotel

This package is auto-updated.

Last update: 2026-05-29 14:14:23 UTC


README

Installation

composer require open-telemetry/sdk-configuration

Usage

Initialization from configuration file

$configuration = Configuration::parseFile(__DIR__ . '/kitchen-sink.yaml');
$sdkBuilder = $configuration->create();

Performance considerations

Parsing and processing the configuration is rather expensive. It is highly recommended to provide the $cacheFile parameter when running in a shared-nothing setup.

$configuration = Configuration::parseFile(
 __DIR__ . '/kitchen-sink.yaml',
 __DIR__ . '/var/cache/opentelemetry.php',
);
$sdkBuilder = $configuration->create();

Contributing

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