We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9b54383 + 509784c commit 3904da9Copy full SHA for 3904da9
lib/private/OpenMetrics/Exporters/Cached.php
@@ -13,6 +13,8 @@
13
use OCP\ICache;
14
use OCP\ICacheFactory;
15
use OCP\OpenMetrics\IMetricFamily;
16
+use OCP\OpenMetrics\Metric;
17
+use OCP\OpenMetrics\MetricValue;
18
use Override;
19
20
/**
@@ -43,7 +45,12 @@ abstract public function gatherMetrics(): Generator;
43
45
public function metrics(): Generator {
44
46
$cacheKey = static::class;
47
if ($data = $this->cache->get($cacheKey)) {
- yield from unserialize($data);
48
+ yield from unserialize(
49
+ $data,
50
+ [
51
+ 'allowed_classes' => [Metric::class, MetricValue::class],
52
+ ],
53
+ );
54
return;
55
}
56
0 commit comments