Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Configurator.php

function Configurator::with

Parameters

Closure(T, InstrumentationScopeInterface): void $closure:

File

vendor/open-telemetry/sdk/Common/InstrumentationScope/Configurator.php, line 39

Class

Configurator
@template T

Namespace

OpenTelemetry\SDK\Common\InstrumentationScope

Code

public function with(Closure $closure, ?string $name, ?string $version = null, ?string $schemaUrl = null) : self {
    $this->configurators[] = $configurator = new ConfiguratorClosure($closure, self::namePattern($name), $version, $schemaUrl);
    foreach ($this->configs as $instrumentationScope => $config) {
        if ($configurator->matches($instrumentationScope)) {
            ($configurator->closure)($config, $instrumentationScope);
        }
    }
    return $this;
}
RSS feed
Powered by Drupal