OpenTelemetry PHP

ConfigurationFactory
in package

FinalYes
Tags
template

T

Table of Contents

Properties

$compiledFactory  : CompiledConfigurationFactory
$componentProviders  : iterable<string|int, mixed>
$envReader  : EnvReader
$rootComponent  : ComponentProvider

Methods

__construct()  : mixed
parseFile()  : ComponentPlugin
process()  : ComponentPlugin<string|int, T>
compileFactory()  : CompiledConfigurationFactory

Properties

Methods

parseFile()

public parseFile(string|array<int, string> $file[, string|null $cacheFile = null ][, bool $debug = true ]) : ComponentPlugin
Parameters
$file : string|array<int, string>

path(s) to parse

$cacheFile : string|null = null

path to cache parsed configuration to

$debug : bool = true

will check for cache freshness if debug mode enabled

Tags
throws
Exception

if loading of a configuration file fails for any reason

throws
InvalidConfigurationException

if the configuration is invalid

throws
Throwable

if a cache file is given and a non-serializable component provider is used

see
https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/file-configuration.md#parse
psalm-suppress

PossiblyNullReference

Return values
ComponentPlugin

parsed component plugin

process()

public process(array<string|int, mixed> $configs[, ResourceCollection|null $resources = null ]) : ComponentPlugin<string|int, T>
Parameters
$configs : array<string|int, mixed>

configs to process

$resources : ResourceCollection|null = null

resources that can be used for cache invalidation

Tags
throws
InvalidConfigurationException

if the configuration is invalid

Return values
ComponentPlugin<string|int, T>

processed component plugin

compileFactory()

private compileFactory() : CompiledConfigurationFactory
Return values
CompiledConfigurationFactory

        
On this page

Search results