function Configurator::resolve
Return value
T
File
-
vendor/
open-telemetry/ sdk/ Common/ InstrumentationScope/ Configurator.php, line 55
Class
- Configurator
- @template T
Namespace
OpenTelemetry\SDK\Common\InstrumentationScopeCode
public function resolve(InstrumentationScopeInterface $instrumentationScope) : Config {
if ($config = $this->configs[$instrumentationScope] ?? null) {
return $config;
}
$config = ($this->factory)($instrumentationScope);
foreach ($this->configurators as $configurator) {
if ($configurator->matches($instrumentationScope)) {
($configurator->closure)($config, $instrumentationScope);
}
}
return $this->configs[$instrumentationScope] ??= $config;
}