mirror of
https://github.com/nextcloud/server.git
synced 2026-06-13 18:50:47 -04:00
Merge pull request #57768 from nextcloud/backport/57765/stable33
[stable33] fix(openmetrics): Multiple exporters per app
This commit is contained in:
commit
6f1502ceca
1 changed files with 12 additions and 7 deletions
|
|
@ -63,13 +63,18 @@ class ExporterManager {
|
|||
if (!isset($appInfo[self::XML_ENTRY]) || !is_array($appInfo[self::XML_ENTRY])) {
|
||||
continue;
|
||||
}
|
||||
foreach ($appInfo[self::XML_ENTRY] as $classname) {
|
||||
if (isset($this->skippedClasses[$classname])) {
|
||||
continue;
|
||||
}
|
||||
$exporter = $this->loadExporter($classname, $appId);
|
||||
if ($exporter !== null) {
|
||||
yield $exporter;
|
||||
foreach ($appInfo[self::XML_ENTRY] as $classEntries) {
|
||||
// When multiple exporters are specified, $classEntries will be an array, instead of a string
|
||||
$classnames = is_array($classEntries) ? $classEntries : [$classEntries];
|
||||
|
||||
foreach ($classnames as $classname) {
|
||||
if (isset($this->skippedClasses[$classname])) {
|
||||
continue;
|
||||
}
|
||||
$exporter = $this->loadExporter($classname, $appId);
|
||||
if ($exporter !== null) {
|
||||
yield $exporter;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue