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

Breadcrumb

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

function Meter::updateConfigurator

@internal

Overrides Configurable::updateConfigurator

File

vendor/open-telemetry/sdk/Metrics/Meter.php, line 79

Class

Meter
@internal

Namespace

OpenTelemetry\SDK\Metrics

Code

public function updateConfigurator(Configurator $configurator) : void {
    $this->config = $configurator->resolve($this->instrumentationScope);
    $startTimestamp = $this->clock
        ->now();
    foreach ($this->instruments->observers[self::instrumentationScopeId($this->instrumentationScope)] as [
        $instrument,
        $stalenessHandler,
        $r,
    ]) {
        if ($this->config
            ->isEnabled() && $r->dormant) {
            $this->metricFactory
                ->createAsynchronousObserver($this->registry, $this->resource, $this->instrumentationScope, $instrument, $startTimestamp, $this->viewRegistrationRequests($instrument, $stalenessHandler));
            $r->dormant = false;
        }
        if (!$this->config
            ->isEnabled() && !$r->dormant) {
            $this->releaseStreams($instrument);
            $r->dormant = true;
        }
    }
    foreach ($this->instruments->writers[self::instrumentationScopeId($this->instrumentationScope)] as [
        $instrument,
        $stalenessHandler,
        $r,
    ]) {
        if ($this->config
            ->isEnabled() && $r->dormant) {
            $this->metricFactory
                ->createSynchronousWriter($this->registry, $this->resource, $this->instrumentationScope, $instrument, $startTimestamp, $this->viewRegistrationRequests($instrument, $stalenessHandler), $this->exemplarFilter);
            $r->dormant = false;
        }
        if (!$this->config
            ->isEnabled() && !$r->dormant) {
            $this->releaseStreams($instrument);
            $r->dormant = true;
        }
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal