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\MetricsCode
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;
}