function CriteriaViewRegistry::generateViews
1 call to CriteriaViewRegistry::generateViews()
- CriteriaViewRegistry::find in vendor/
open-telemetry/ sdk/ Metrics/ View/ CriteriaViewRegistry.php - @todo is null the best return type here? what about empty array or exception?
File
-
vendor/
open-telemetry/ sdk/ Metrics/ View/ CriteriaViewRegistry.php, line 35
Class
Namespace
OpenTelemetry\SDK\Metrics\ViewCode
private function generateViews(Instrument $instrument, InstrumentationScopeInterface $instrumentationScope) : Generator {
foreach ($this->criteria as $i => $criteria) {
if ($criteria->accepts($instrument, $instrumentationScope)) {
(yield $this->views[$i]
->project($instrument));
}
}
}