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

Breadcrumb

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

function Meter::getAsynchronousInstrument

Return value

array{Instrument, ReferenceCounterInterface, RegisteredInstrument}|null

1 call to Meter::getAsynchronousInstrument()
Meter::batchObserve in vendor/open-telemetry/sdk/Metrics/Meter.php
Reports measurements for multiple asynchronous instrument from a single callback.

File

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

Class

Meter
@internal

Namespace

OpenTelemetry\SDK\Metrics

Code

private function getAsynchronousInstrument(Instrument $instrument, InstrumentationScopeInterface $instrumentationScope) : ?array {
    $instrumentationScopeId = $this->instrumentationScopeId($instrumentationScope);
    $instrumentId = $this->instrumentId($instrument);
    $asynchronousInstrument = $this->instruments->observers[$instrumentationScopeId][$instrumentId] ?? null;
    if (!$asynchronousInstrument || $asynchronousInstrument[0] !== $instrument) {
        return null;
    }
    return $asynchronousInstrument;
}

API Navigation

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