Lines 0.00% 0 / 2
Methods 0.00% 0 / 2
Classes 0.00% 0 / 1
Name Lines Methods CRAP
 __construct 0.00% 0 / 1 0.00% 0 / 1 2
 exportMetrics 0.00% 0 / 1 0.00% 0 / 1 2
9final readonly class RuntimeMetricsExporter
10{
11    public function __construct(
12        private SnapshotSource $snapshots,
13        private RuntimeMetricsCollector $collector,
14        private PrometheusTextEncoder $encoder,
15    ) {}
16
17    public function exportMetrics(): string
18    {
19        return $this->encoder->encodeFamilies($this->collector->collectMetrics($this->snapshots->takeSnapshot()));
20    }
21}